[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
undefined symbols in piostreams lib
From: |
Daniel E Baumann |
Subject: |
undefined symbols in piostreams lib |
Date: |
26 Sep 2002 06:20:44 -0500 |
Hi, I am trying t compile my demo program that uses the piostreams but
now I keep getting undefined symbols for a few things which doesn't make
sense as this sutff compiled fine before. I am using:
g++ (GCC) 3.2.1 20020924 (Debian prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Here's what a simple make in the demo directory gives me now:
address@hidden:~/src/cvs/commoncpp2/demo$ make
/bin/sh ../libtool --mode=link g++ -g -O2 -D_GNU_SOURCE -o serial
serialmain.o serialecho.o ../src/libccext2.la -lxml2 -lz
../src/libccgnu2.la -pthread -ldl
g++ -g -O2 -D_GNU_SOURCE -o .libs/serial serialmain.o serialecho.o
-pthread ../src/.libs/libccext2.so /usr/lib/libxml2.so -lm -lz
../src/.libs/libccgnu2.so -ldl
serialmain.o: In function `__static_initialization_and_destruction_0':
/usr/include/c++/3.2/iostream:62: undefined reference to
`ost::Init::~Init [in-charge]()'
/usr/include/c++/3.2/iostream:62: undefined reference to
`ost::Init::Init[in-charge]()'
serialecho.o: In function `__static_initialization_and_destruction_0':
/usr/include/c++/3.2/iostream:62: undefined reference to
`ost::Init::~Init [in-charge]()'
/usr/include/c++/3.2/iostream:62: undefined reference to
`ost::Init::Init[in-charge]()'
collect2: ld returned 1 exit status
make: *** [serial] Error 1
Also trying to build pio.cpp it self gives me:
/bin/sh ../libtool --mode=link g++ -g -O2 -D_GNU_SOURCE -o pio
pio.o ../src/libccext2.la -lxml2 -lz ../src/libccgnu2.la -pthread -ldl
g++ -g -O2 -D_GNU_SOURCE -o .libs/pio pio.o -pthread
../src/.libs/libccext2.so /usr/lib/libxml2.so -lm -lz
../src/.libs/libccgnu2.so -ldl
pio.o: In function `Thread1::run()':
/home/danielb/src/cvs/commoncpp2/demo/pio.cpp:94: undefined reference to
`ost::pout'
pio.o: In function `Thread1::run()':
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/thread.h:292:
undefined reference to `ost::pout'
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/thread.h:292:
undefined reference to `ost::pout'
pio.o: In function `Thread1::run()':
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/postream:140:
undefined reference to `ost::pout'
pio.o: In function `Thread1::run()':
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/thread.h:292:
undefined reference to `ost::pout'
pio.o:/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/thread.h:292: more
undefined references to `ost::pout' follow
pio.o: In function `__static_initialization_and_destruction_0':
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/piostream:70:
undefined reference to `ost::Init::Init[in-charge]()'
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/piostream:70:
undefined reference to `ost::Init::~Init [in-charge]()'
pio.o: In function `ost::basic_postream<char, std::char_traits<char> >&
ost::operator<< <std::char_traits<char> >(ost::basic_postream<char,
std::char_traits<char> >&, char const*)':
/home/danielb/src/cvs/commoncpp2/demo/pio.cpp:76: undefined reference to
`ost::Thread::getThreadID() const'
pio.o: In function `ost::basic_postream<char, std::char_traits<char> >&
ost::operator<< <char, std::char_traits<char>, std::allocator<char>
>(ost::basic_postream<char, std::char_traits<char> >&,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)':
/home/danielb/src/cvs/commoncpp2/demo/pio.cpp:76: undefined reference to
`ost::Thread::getThreadID() const'
collect2: ld returned 1 exit status
make: *** [pio] Error 1
/bin/sh ../libtool --mode=link g++ -g -O2 -D_GNU_SOURCE -o pio
pio.o ../src/libccext2.la -lxml2 -lz ../src/libccgnu2.la -pthread -ldl
g++ -g -O2 -D_GNU_SOURCE -o .libs/pio pio.o -pthread
../src/.libs/libccext2.so /usr/lib/libxml2.so -lm -lz
../src/.libs/libccgnu2.so -ldl
pio.o: In function `Thread1::run()':
/home/danielb/src/cvs/commoncpp2/demo/pio.cpp:94: undefined reference to
`ost::pout'
pio.o: In function `Thread1::run()':
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/thread.h:292:
undefined reference to `ost::pout'
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/thread.h:292:
undefined reference to `ost::pout'
pio.o: In function `Thread1::run()':
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/postream:140:
undefined reference to `ost::pout'
pio.o: In function `Thread1::run()':
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/thread.h:292:
undefined reference to `ost::pout'
pio.o:/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/thread.h:292: more
undefined references to `ost::pout' follow
pio.o: In function `__static_initialization_and_destruction_0':
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/piostream:70:
undefined reference to `ost::Init::Init[in-charge]()'
/home/danielb/src/cvs/commoncpp2/demo/../include/cc++/piostream:70:
undefined reference to `ost::Init::~Init [in-charge]()'
pio.o: In function `ost::basic_postream<char, std::char_traits<char> >&
ost::operator<< <std::char_traits<char> >(ost::basic_postream<char,
std::char_traits<char> >&, char const*)':
/home/danielb/src/cvs/commoncpp2/demo/pio.cpp:76: undefined reference to
`ost::Thread::getThreadID() const'
pio.o: In function `ost::basic_postream<char, std::char_traits<char> >&
ost::operator<< <char, std::char_traits<char>, std::allocator<char>
>(ost::basic_postream<char, std::char_traits<char> >&,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)':
/home/danielb/src/cvs/commoncpp2/demo/pio.cpp:76: undefined reference to
`ost::Thread::getThreadID() const'
collect2: ld returned 1 exit status
make: *** [pio] Error 1
I notied that when I used nm -s on pios.o and pio_globals.o from the src
dir that there are no symbols in these object files. I dunno what's up
with this, maybe my gcc is b0rked? This program used to link fine. I
can't see where it's not linking in the proper lib or anything like
that. Can anyone lend a hand? ;).
Dan
--
And if cynics ridicule freedom, ridicule community...if ``hard nosed
realists'' say that profit is the only ideal...just ignore them, and use
copyleft all the same.
-- RMS
- undefined symbols in piostreams lib,
Daniel E Baumann <=