This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Linking libstdc++.a into a shared library.
On December 13, 2002 03:49 pm, Benjamin Kosnik wrote:
> Can you come up with a way for me to demonstrate this myself? Be exact.
// smw.cpp
#include <iostream>
void
smw()
{
std::cout << "Hello, static world!\n";
}
// end file
stephen_[1010]> gcc -print-file-name=libstdc++.a
/smw/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.3/../../../libstdc++.a
stephen_[1011]> gcc -shared -o smw.so smw.cpp /smw/gnu/lib/libstdc++.a
/smw/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.3/../../../../i686-pc-linux-gnu/bin/ld:
smw.so: undefined versioned symbol name std::time_put_w@@GLIBCPP_3.2
/smw/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.3/../../../../i686-pc-linux-gnu/bin/ld:
failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
stephen_[1012]> gcc -v
Reading specs from /smw/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: /home/stephenw/gnu/src/configure --prefix=/smw/gnu
--enable-languages=c++ --enable-threads
Thread model: posix
gcc version 3.3 20021125 (experimental)
--
Stephen M. Webb