Linking errors with gcc 3.1 on AIX 4.3.3
Travis_Ackerman@cargill.com
Travis_Ackerman@cargill.com
Mon Jun 10 12:52:00 GMT 2002
Hi all,
I downloaded the patch from IBM to fix the assembler, but I am still
getting these errors. I tried this code:
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> a;
a.push_back("Hello world");
}
wkdev:/home/tackerma/>g++ main.cpp
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::basic_string[in-charge](char const*, std::allocator<char> const&)
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string
[in-charge]()
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::basic_string[in-charge](std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::operator=(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
I noticed that the vector template gives no trouble at all. Can anyone
give me any help?
PS. I did just a "make distclean" after installing the patch. Do I
need to completely remove everything and then un-tar the source files
before re-configuring and re-building the compiler?
Thanks,
Travis Ackerman
travis_ackerman@cargill.com
-----Original Message-----
From: Ackerman, Travis /wich
Sent: Thursday, May 30, 2002 3:59 PM
To: 'gcc-help@gcc.gnu.org'
Subject: Linking errors with gcc 3.1 on AIX 4.3.3
Hello,
I have built gcc and g++ version 3.1 on an AIX 4.3.3 box. The build
seemed successful, but now I get these errors when trying to compile a
simple C++ program. I also have tried version 3.04 and received
similar errors.
Can anyone give me some help? I don't know if maybe I am missing a
compiler flag or what.
Here is the info for my gcc:
wkdev:/apps/gcc/gcc-3.1/>./config.guess
powerpc-ibm-aix4.3.3.0
wkdev:/home/tackerma/>gcc -v
Reading specs from
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.1/specs
Configured with: ../gcc-3.1/configure --enable-threads=aix
--enable-languages=c,c++ --disable-nls
Thread model: aix
gcc version 3.1
Here is the code I am compiling:
#include <string>
using namespace std;
int main()
{
string teststr = "test";
}
This is the output I get when I use gcc:
wkdev:/home/tackerma/>gcc main.cpp
ld: 0711-317 ERROR: Undefined symbol:
.std::allocator<char>::allocator[in-charge]()
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::basic_string[in-charge](char const*, std::allocator<char> const&)
ld: 0711-317 ERROR: Undefined symbol: .std::allocator<char>::~allocator
[in-charge]()
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string
[in-charge]()
ld: 0711-317 ERROR: Undefined symbol: __gxx_personality_v0
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
This is the output I get when I use g++:
wkdev:/home/tackerma/>g++ main.cpp
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::basic_string[in-charge](char const*, std::allocator<char> const&)
ld: 0711-317 ERROR: Undefined symbol: .std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string
[in-charge]()
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
Any help is greatly appreciated.
Thanks,
Travis Ackerman
travis_ackerman@cargill.com
More information about the Gcc-help
mailing list