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]

ld fails when -L/lib is on the command line


A complicated project I'm building fails on this call to gcc:
gcc -shared <object files> -L<lib_path_in_build_tree> -L/lib
-L/usr/lib <build_libs> <std_libs> -o .libs/cyg<lib>.dll
-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
.libs/lib<lib>.dll.a

If I remove the -L/lib, the call succeeds. Using the -v option to gcc,
I see that it's actually a call to
/usr/lib/gcc/i686-pc-cygwin/4.3.4/collect2.exe (which claims to be
ld.exe) that fails. Unfortunately, the gcc command is actually called
from "libtool --mode=install", so can't see any way to expunge the
offending -L/lib. How do I get this build to succeed?

regards,
NT

P.S. Also, is this a bug in the gcc-4.3.4 linker, or is it some other problem?

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