undefined reference uuid_parse



Please forgive the newb question but I cannot seem to find why this
code is giving me the following error:

]gcc parse_uuid.c
/tmp/ccGKD3b0.o(.text+0x18): In function `main':
: undefined reference to `uuid_generate'
collect2: ld returned 1 exit status

Here is the code:

#include <uuid/uuid.h>


int main (int argc, char **argv) {
uuid_t theID ;

uuid_parse (argv [1], theID) ;
//uuid_generate (theID) ;

printf ("Original UUID: %s\nIn Hex: %i\n", argv [1], theID) ;

return 1 ;


}

Any suggestions would be greatly appreciated, thanks!

-Greg

.



Relevant Pages

  • [2.6 patch] re-add -ffreestanding
    ... I got the following compile error with gcc 4.1.1 when trying to compile ... profile.c:: undefined reference to `strcpy' ... The Linux kernel is a freestanding environment, ...
    (Linux-Kernel)
  • all KDE app builds fail
    ... I upgraded to KDE 3.1.3, ... I also upgraded my gcc to version 3.2.2. ... : undefined reference to `QStyleFactory::create' ... may be so for some apps, but can it be true for every KDE app that I build? ...
    (Debian-User)
  • An error which is driving me slowly mad
    ... Using GCC version ... on SuSE 9.0, I keep getting "undefined reference to ... `function'"-type errors for no apparent reason! ...
    (comp.lang.c)
  • Possible GCC problem
    ... This isn't exactly strictly Red Hat related, but since I get all my GCC ... I commented the array statement out and tried to compile it. ... Here is my program code for ... : undefined reference to `std::basic_ostream<char, ...
    (RedHat)
  • Re: Got idle CPU cycles?
    ... > Offer fast CPU time or ignore the thread. ... undefined reference to operator new' ... Or maybe I'm using the wrong flags to gcc? ... If all the attempts to falsify the theory fails, ...
    (comp.os.linux.misc)