library link order

library link order

Post by sam johnso » Thu, 21 Nov 1996 04:00:00



hi all.  i'm trying to build a motif app on  X11R6, Motif1.2,
UIM/X2.9, Sybase4.9.

can someone suggest a strategy for ordering the libraries correctly so
that all symbols are resolved  (i.e. X, then Motif, then Sybase, etc.,
etc.)  libraries which i'm linking include the following:

Xm, Xt, X11, m, c, xpg, sybdb, ...

-sam

 
 
 

library link order

Post by Ian Fin » Fri, 22 Nov 1996 04:00:00



> hi all.  i'm trying to build a motif app on  X11R6, Motif1.2,
> UIM/X2.9, Sybase4.9.

> can someone suggest a strategy for ordering the libraries correctly so
> that all symbols are resolved  (i.e. X, then Motif, then Sybase, etc.,
> etc.)  libraries which i'm linking include the following:

> Xm, Xt, X11, m, c, xpg, sybdb, ...

> -sam

Probrably -lm -lc should be last....

I don't know what all is in th Xm, Xt, etc libs....
You would have to find out what those libs depend on and put the
depended on libraries after the libs that need them.

Most linkers don't need this ordering, yet some do...<sigh>

Ian Fink


 
 
 

1. Library link order

Ok, I'm tired of this problem, when linking libraries on the cc command
line with the -l option, often there are unresolved externals.
Rearranging the order of the libraries on the command line can fix the
problem, but when there are lots of libraries (some static, some
dynamic, some third party libs and some custom reusable stuff), this can
be a very time consuming adventure. There _has_ to be a way to get the
linker to figure out how to get this stuff linked without screwing
around with library ordering... Any tips would be _very_ much
appreciated...

Pete.

2. How to configure Matrox MGA-G100 display

3. Library order when linking?

4. Xfree 1.2 Problems

5. ld, link order and libraries

6. Diff. between SunOS4.1.3_U1 and SunOS4.1.3_U1 VB

7. library order when linking

8. Didgital Unix Crashes

9. linking static library against another library

10. Linking a .a library into a .so library

11. dynamic link libraries and static libraries

12. Question: Inclusion of shared libraries during linking of shared libraries

13. Problem linking when using C++ library in a library on Solaris