public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gcc x86 - problem on library search order
@ 2016-04-25 19:34 Marco Atzeri
  2016-04-26 12:11 ` JonY
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Atzeri @ 2016-04-25 19:34 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-26 13:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-25 19:34 gcc x86 - problem on library search order Marco Atzeri
2016-04-26 12:11 ` JonY
2016-04-26 13:54   ` Marco Atzeri
2016-04-26 17:29     ` JonY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).