[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ convenience libraries
From: |
Albert Chin |
Subject: |
Re: C++ convenience libraries |
Date: |
Mon, 25 Aug 2003 10:22:05 -0500 |
User-agent: |
Mutt/1.4i |
On Sun, Aug 24, 2003 at 02:32:37AM -0400, Greg Hudson wrote:
> > When libtool builds these convenience libraries, it adds the static
> > libstdc++ library (by extracting the contents of libstdc++, then
> > adding it to the convenience library)
>
> I'm seeing the same thing on Solaris 9, with a gcc installed without
> shared libraries. (I sent a note about it to address@hidden but
> don't see it in the archives.) The following script demonstrates the
> problem:
>
> echo '#include <iostream>' > test.cc
> echo 'void test() { std::cout << "1"; }' >> test.cc
> libtool --mode=compile g++ -o test.lo -c test.cc
> libtool --mode=link g++ -o libtest.la test.lo
>
> echo '#include <iostream>' > test2.cc
> echo 'void test(); void test2() { test(); std::cout << "2"; }' >> test2.cc
> libtool --mode=compile g++ -o test2.lo -c test2.cc
> libtool --mode=link g++ -rpath /tmp -o libtest2.la test2.lo libtest.la
>
> One possible solution is to ignore postdeps when creating convenience
> libraries.
Any downsides to this? It does seem to make sense. And what about C
convenience libraries (or any convenience library)? Ignore postdeps
totally when creating convenience libraries?
--
albert chin (address@hidden)