This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc x86 - problem on library search order


Visible on 32bit and not present on 64bit

$ cat uuid.c
#include <uuid/uuid.h>

int main ()
{
    uuid_t out;
    uuid_generate_random(out);
    return 0;
}


$ gcc uuid.c -luuid
/tmp/ccLlmFMf.o:uuid.c:(.text+0x16): undefined reference to `uuid_generate_random'
collect2: error: ld returned 1 exit status

$ gcc uuid.c -luuid -L /usr/lib


The problem seems "/usr/lib/w32api" searched
before "/usr/lib"

$ cygcheck -l w32api-runtime |grep libuuid.
/usr/lib/w32api/libuuid.a

$ cygcheck -l libuuid-devel |grep libuuid.dll
/usr/lib/libuuid.dll.a

$ cygcheck -c gcc-core
Cygwin Package Information
Package              Version        Status
gcc-core             5.3.0-4        OK


Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]