delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/11/19:23:52

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <29938897.post@talk.nabble.com>
Date: Mon, 11 Oct 2010 16:23:34 -0700 (PDT)
From: "kenny AT ca" <heqing DOT gugle AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: x86_64-w64-mingw32-g++ can't find -ldl
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019