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

kenny@ca heqing.gugle@gmail.com
Mon Oct 11 23:23:00 GMT 2010


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
/usr/lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/bin/ld:
can
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
/usr/local/bin:/usr/bin:/bin:.:/usr/x86_64-w64-mingw32/sys-root/mingw/include:/u
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: http://old.nabble.com/x86_64-w64-mingw32-g%2B%2B-can%27t-find--ldl-tp29938897p29938897.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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



More information about the Cygwin mailing list