[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Favoring static linking at configure time

From: Benoit Sigoure
Subject: Re: Favoring static linking at configure time
Date: Wed, 19 Dec 2007 09:10:13 +0100

On Dec 16, 2007, at 4:23 PM, Benoit Sigoure wrote:

OK So finally I solved the whole thing by adding /abs/path/to/ libfoo.$libext (instead of -lfoo) in $LIBS ($libext is computed by libtool, most of the time it's .a but it happens to be .lib at least for MSVC). This is probably fragile but at least it works on GNU/Linux (GCC, ICC), OSX (Apple GCC) and Windows (Cygwin, MinGW, MSVC).

I stumbled on the following problem (on Linux and MacOSX, at least):

/bin/sh ../libtool --tag=CXX --mode=link g++ [-Warning-flags] - D_THREAD_SAFE -g -O2 -static -L/opt/local/lib -R/opt/local/lib -o -rpath /usr/local/gostai/kernel/powerpc-apple- darwin8.8.0/engine [all-my.lo] /opt/local/lib/libboost_thread-mt-1_34.a
mkdir .libs
*** Warning: Linking the shared library against the
*** static library /opt/local/lib/libboost_thread-mt-1_34.a is not portable! ar cru .libs/libkernel.a /opt/local/lib/libboost_thread-mt-1_34.a [all-my.o]
ranlib .libs/libkernel.a

Isn't it weird that Libtool puts an installed static archive in the static archive I'm building?

(I used both Apple's Libtool which comes with DevTools 2.4 and hasn't got a --version and Debian's (GNU libtool) 1.5.22 Debian 1.5.22-4 (1.1220.2.365 2005/12/18 22:14:06))

Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory

reply via email to

[Prev in Thread] Current Thread [Next in Thread]