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]

x86_64-w64-mingw32-g++ can't find -ldl

I'm using x86_64-w64-mingw32 in cygwin as 64-bit compiler to build 64-bit
applications. Functions like dlopen(), dlerror(), etc., are used in codes. I
got errors when linking *.o to *.dll as follows. 

echo Linking shared library myxx.dll 
x86_64-w64-mingw32-g++ -D(omitted) -I(omitted) -minline-all-stringops -Wall
-fno-strict-aliasing -Wunused -Wno-unused-function -Wnon-virtual-dtor -msse2
mfpmath=sse -m64 -shared   xx1.o ...(omit others) -ldl -lstdc++ -Wl, -m64
-lpthread -o myxx.dll
not find -ldl
collect2: ld returned 1 exit status

developement environment:
about environment:
OS: 64-bit Windows7, Cygwin 1.7
$ uname -srv
CYGWIN_NT-6.1-WOW64 1.7.7(0.230/5/3) 2010-08-31 09:58

$ echo $PATH
sr/include:/usr/lib/lapack ...

libdl.a is in c:\cygwin\lib\, but I did not see it in
C:\cygwin\usr\x86_64-w64-mingw32\. In fact, I found there is only a file
libiberty.a in C:\cygwin\usr\x86_64-w64-mingw32\lib64.

I think I may not use x86_64-w64-mingw32-gcc correctly. Please help beat the
error. Thank you

View this message in context:
Sent from the Cygwin list mailing list archive at

Problem reports:
Unsubscribe info:

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