* Roesner Thomas wrote on Mon, Dec 12, 2005 at 09:28:54AM CET: > > > On Fri, Dec 09, 2005 at 04:25:42PM +0100, Roesner Thomas wrote: > > > The point is, that I want to build all programs with shared libraries, > > > but one with static libraries, wich are based on the same sourcecode > > > than the shared libraries. Adding "myprog_LDFLAGS = -all-static" does > > > not work. > > > > Could you perhaps elaborate what you mean by "does not work"? > > "does not work" means, that the linker can find all refered symbols in > the dynamic scenario, but that there are some unresolved symbols in > the static scenario. > > Looking in subdir/.libs/mylib.a shows the required symbols in the text > area of the library.
The most likely issue is that with static libraries, you need to specify them in the correct order: undefined symbols from libraries early in the command line will, if not yet found in any of the pulled-in objects, be searched only in later objects/libraries. If you libraries depend on one another mutually, you may even have to specify some more than once, and also fiddle with libtool's --preserve-dup-deps. Or there may always be a bug, who knows. In order to be able to say more, you need to show more. For example, a small example that reproduces the issue. Cheers, Ralf
