libtool
[Top][All Lists]
Advanced

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

Reordering the command line


From: Herb Hrowal
Subject: Reordering the command line
Date: Wed, 29 Dec 2004 17:35:56 -0800

I'm trying to use libtool to compile and link my program. I don't care
if most of the libraries I link to are static or dynamic except 1. I
need to link to the static version of  the library.  My command looks
like this:

libtool --mode=link gcc -static <all the object files> -la -lb -lc
-Wl,-Bstatic -ld -Wl,-Bdynamic -le -lf

Obviously I need to link to libd.a and not libd.so. Anyway, libtool
reorders the command line to look like this:

gcc <all the object files> -Wl,-Bstatic -Wl,-Bdynamic -la -lb -lc -ld -le -lf

As a result the wrong library is linked in. I know I can specify the
library by including it, but I need this to build on several different
machines each with the library in a different location.

My question is why does libtool find it necessary to reorder things for me?

Herb




reply via email to

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