This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Problems compiling certain programs
- To: gcc-help at gcc dot gnu dot org
- Subject: Problems compiling certain programs
- From: Larry <larrywyb at larry dot yi dot org>
- Date: Wed, 17 Oct 2001 22:05:54 +0000
I upgraded gcc to gcc-3 and because many programs waarned against
using version 3 to build their programs I went back to gcc-2.95.3.
The origional version on my machine was egcs-2.91.66.
The problem I have run into is now I am having what I believe are linking
errors when a call to iostream, ostream, cerr and so on is made
Here's a few of the actual errors I am getting:
.libs/dispatcher.o(.text+0x5be): undefined reference to `cerr'
.libs/dispatcher.o(.text+0x5c4): undefined reference to `ostream::operator<<
(char const *)'
.libs/dispatcher.o(.text+0x5cc): undefined reference to `endl(ostream &)'
.libs/dispatcher.o: In function `Arts::Dispatcher::~Dispatcher(void)':
.libs/dispatcher.o(.text+0x21a0): undefined reference to `cerr'
.libs/dispatcher.o(.text+0x21a6): undefined reference to `ostream::operator<<
(char const *)'
.libs/dispatcher.o(.text+0x21af): undefined reference to `ostream::operator<<
(long)'
.libs/mcopconfig.o(.text+0x8f): undefined reference to `ios virtual table'
.libs/mcopconfig.o(.text+0xe4): undefined reference to
`fstreambase::fstreambase(int, char const *, int, int)'
.libs/mcopconfig.o(.text+0xed): undefined reference to `istream::ios virtual
table' .libs/mcopconfig.o(.text+0x106): undefined reference to
`ifstream::ios virtual table' .libs/mcopconfig.o(.text+0x393): undefined
reference to `ifstream::~ifstream(void)' .libs/mcopconfig.o(.text+0x48e):
undefined reference to `ifstream::~ifstream(void)'
.libs/mcopconfig.o(.gnu.linkonce.t.__rs__H3ZcZt18string_char_traits1ZcZt24__
default_alloc_template2b1i0_R7istreamRt12basic_string3ZX01ZX11ZX21_R7istream+
0x4c):undefined reference to `ostream::flush(void)'
.libs/mcopconfig.o(.gnu.linkonce.t.__rs__H3ZcZt18string_char_traits1ZcZt24__
default_alloc_template2b1i0_R7istreamRt12basic_string3ZX01ZX11ZX21_R7istream+
0x60): undefined reference to `istream::_skip_ws(void)'
.libs/mcopconfig.o(.gnu.linkonce.t.__rs__H3ZcZt18string_char_traits1ZcZt24__
default_alloc_template2b1i0_R7istreamRt12basic_string3ZX01ZX11ZX21_R7istream+
0x78):undefined reference to `streambuf::sungetc(void)' .libs/trader_impl.o:
In function `Arts::TraderOffer_impl::TraderOffer_impl(int, basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > const &,
basic_string<char, string_char_traits<char>, __default_alloc_template<true,
0> > const &)': .libs/trader_impl.o(.text+0x309): undefined reference to
`ios virtual table' .libs/trader_impl.o(.text+0x35e): undefined reference to
`fstreambase::fstreambase(int, char const *, int, int)'
.libs/trader_impl.o(.text+0x367): undefined reference to `istream::ios
virtual table' .
Not being a programming genius, I'm guessing about whether these are linker
errors or not. (:
I'm afraid I have too many headers and libraries for too many versions on my
machine and need to remove the unnecessary ones.
The Origional version is in the /usr directory while version 3 and 2.95.3
were installed in the /usr/local directory.
When I built 2.95.3 to replace gcc-3 I installed 2.95.3 over gcc-3. Is that
kosher or did I screw up?
How can I remove all the headers and Libs I don't need?
BTW, my system is Slackware kernel 2.2.19
HELP! (:
Thanks
--
"You can always make peace with an F-16 in your pocket"
-Yitzhak Rabin