Glenn Moeller-Holst wrote:
> Hi!
> 
> I have got some sort of problem linking a program called necpp under Mac 
> OS 10.4.10, fink, xcode_2.4.1_8m1910_6936315.dmg:
> http://www.physics.otago.ac.nz/research/electronics/nec/necpp-1.2.3.tar.gz
> ( http://www.physics.otago.ac.nz/research/electronics/nec/ )
[]
> Other programs seems to the same problem:
> Re: [Bacula-users] ld: can't locate file for: -lcrt0.o
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg25807.html
> 
> "Solution"?:
> http://forums.macosxhints.com/archive/index.php/t-273.html
> 
> or another solution?:
[]
> /bin/sh ../libtool --mode=link g++  -g -O2   -o nec2++ -all-static 
> nec2cpp.o XGetopt.o ../src/libnecpp.la
> g++ -g -O2 -o nec2++ -static nec2cpp.o XGetopt.o -Wl,-bind_at_load 
> ../src/.libs/libnecpp.a -lm -lstdc++
> /usr/bin/ld: can't locate file for: -lcrt0.o

That libtool script is wrong. It shouldn't translate -all-static into 
-static. What you can do as a quick workaround is, after you run 
./configure and before make, replace the file libtool by 
/usr/bin/glibtool. You will then get

> /bin/sh ../libtool --mode=link g++  -g -O2   -o nec2++ -all-static nec2cpp.o 
> XGetopt.o ../src/libnecpp.la 
> libtool: link: warning: complete static linking is impossible in this 
> configuration
> g++ -g -O2 -o nec2++ nec2cpp.o XGetopt.o -Wl,-bind_at_load  
> ../src/.libs/libnecpp.a -lm -lstdc++

and your build will succeed.

-- 
Martin


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to