From: Felix E. Klee (felix.klee.jamboost_at_[hidden])
Date: 2003-01-23 09:47:02
On Thursday 23 January 2003 15:37, Vladimir Prus wrote:
> > I just did a little static library test that consists of
> > - A static libary ~/projects/kylix-lib-test/bar.a created in the IDE.
> > - A console application ~/projects/kylix-test/foo created in the IDE.
> > Results:
> > 1. The linker command line generated by the IDE, of course, works:
> > ilink [...] -L[...]/net/hubble/Users/felix/projects/kylix-lib-test\
> > borinit.o crt1.o foo.o, foo,, ../kylix-lib-test/bar.a libborcrtl.a
> > \ libborstl.a libborunwind.a libc.so libm.so libdl.so, , foo.res Note
> > that bar.a is specified with a path relative to the current directory. 2.
> > Removing the relative path doesn't work:
> > ilink [...] -L[...]:/net/hubble/Users/felix/projects/kylix-lib-test
> > \ borinit.o crt1.o foo.o, foo,, bar.a libborcrtl.a \
> > libborstl.a libborunwind.a libc.so libm.so libdl.so, , foo.res
> > =>
> > Fatal: Unable to open file 'bar.a'
> > Hm, that's unlike to what's printed in the documentation. It seems to
> > be another ilink bug or a Kylix documentation bug. Weirdly though, ilink
> > finds libborstl.a, etc..
> Ick! What does it say if you specify "libbar.a" in the linker commnad line
> (but don't change the name of the actual library?)
Fatal: Unable to open file 'libbar.a'
BTW, I just tried "-L../kylix-lib-test" but it still can't find bar.a if
either "bar.a" or "libbar.a" is specified.
> > Conclusion:
> > 1. Static libraries created by the user or third party libraries need to
> > be specified with their complete path.
> Static libraries which are created by Boost.Build will be linked by
> complete path already. About third parties: this looks very strange.
> Probably they really should have written better docs ;-)
It probably looks only in $(BCB)/lib and in the current directory for static
libraries and ignores the -L option. To make sure that the problem is not
caused by bar.a itself, I just moved $(BCB)/lib/libborcrtl* to
../kylix-lib-test and now I get (with -L correctly set, of course)
Fatal: Unable to open file 'libborcrtl.a'
I probably should report this as a bug to Quality Central.
> > Yes, it works now. However, I had to change qt-mt into qt in new/qt.jam
> > since I didn't try to compile the multi threaded QT library for Kylix
> > yet. Shouldn't qt be the default and only be changed to qt-mt when
> > <threading> is set to multi?
> You've right! Care to try fixing that? The add-properties rule in qt.jam is
> the key: just compute the library name depending on whether <theading>multi
> is in properties.
OK, I'll try it, but probably not today; tomorrow evening is more likely.
-- To contact me personally don't reply but send email to felix DOT klee AT inka DOT de
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk