libtool
[Top][All Lists]
Advanced

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

options order when invoquing the linker


From: Sebastien Sable
Subject: options order when invoquing the linker
Date: 24 Jul 2001 22:00:07 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Hello,

I have a little problem concerning libtool not respecting the order of
options when invoquing a linker.

When I run libtool with this :

/bin/sh ./libtool --mode=link c++  -g -O2  -o libblind.la -rpath 
/usr/local/cross-tools/i386-mingw32msvc/lib -no-undefined --noinhibit-exec 
-mcoonsole --export-all-symbols -Xlinker 
/usr/local/cross-tools/i386-mingw32msvc/lib/libalut.a -lopenal32 csdemo.lo 
audioenv.lo avenvironment.lo object.lo 

(Note : ltmain.sh (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18) with mingw 
2.95.3)

It launches gcc like that :

gcc -Wl,--base-file,.libs/libblind-0.dll-base -mdll -Wl,-e,address@hidden -o 
.libs/libblind-0.dll  csdemo.lo audioenv.lo avenviironment.lo object.lo  
.libs/libimp-OpenAL32.a  
-Wl,/usr/local/cross-tools/i386-mingw32msvc/lib/libalut.a

Note that .libs/libimp-OpenAL32.a and
-Wl,/usr/local/cross-tools/i386-mingw32msvc/lib/libalut.a are inversed
compared to -Xlinker /usr/local/cross-tools/i386-mingw32msvc/lib/libalut.a and 
-lopenal32.

The problem is that this generates an error because libalut depends on
openal32 :
/usr/local/cross-tools/i386-mingw32msvc/lib/libalut.a(./Release/ALut.obj.b)(.text+0x6):E:\Projects\openal:
 undefined reference to `alcOpenDevice'

while in the original order everything is fine :

gcc -Wl,--base-file,.libs/libblind-0.dll-base -mdll -Wl,-e,address@hidden -o 
.libs/libblind-0.dll  csdemo.lo audioenv.lo avenviironment.lo object.lo  
-Wl,/usr/local/cross-tools/i386-mingw32msvc/lib/libalut.a  
.libs/libimp-OpenAL32.a

-> OK

How can I force libtool to call gcc correctly?

By the way, I use "-Xlinker .../libalut.a" because that is the only
way I found to be able to link a static library in a dll. When I give
that option directly to libtool, it complains that it wants the shared
library or it will refuse to build a dll. There may be a cleaner way
to do that so that libtool is aware of this option and put it
correctly?

Thanks for your help

-- 
Sébastien Sablé <address@hidden>
http://inova.snv.jussieu.fr/~sable/



reply via email to

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