tags:

views:

1526

answers:

1

I'm trying to replace a call to ::CoCreateGUID so I can generate GUIDs in a C++ program on Linux.

I understand that libuuid (http://linux.die.net/man/3/libuuid) supports this, and I've read this question (http://stackoverflow.com/questions/153676/guids-in-a-c-linux-gcc-app).

I'm a bit new to Ubuntu/GCC/Linux, so I've started off like this:

#include <uuid/uuid.h>

And now I'm stuck :) G++ can't find uuid.h, and I'm not sure how to get/find it.

  • Alex
+3  A: 

In Ubuntu, you can do apt-cache search libuuid to see the available packages relating to the text libuuid. Here's my output from Ubuntu 9.04:

$ apt-cache search libuuid
libuuid-perl - Perl extension for using UUID interfaces as defined in e2fsprogs
libuuid1 - universally unique id library
libuuid1-dbg - Debugging information for libuuid1
uuid-dev - universally unique id library - headers and static libraries
uuid-runtime - universally unique id library
libuuidm-ocaml-dev - Universally unique identifiers for OCaml

So I think the one you want is uuid-dev, and possibly uuid-runtime. Perform the command sudo apt-get install uuid-dev, and it should install the headers and libraries you need to move on past the problem you're having.

Mark Rushakoff
thx, that looks like what I was missing, I ran this: "apt-get install uuid-dev" and that solved my problem.
Alex Black