vBulletin Search Engine Optimization
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
Running AIX 5.3, I'm trying to compile a short piece of code in C++: #include <iostream> using namespace std; int main() { cout << "Dit is AIX 5.3 - C++\n"; } Compilation: $ g++ test.cpp -o testcpp ld: 0711-317 ERROR: Undefined symbol: .std::basic_ostream<char, std::char_traits<char> >& std: perator<< <std::char_traits<char>>(std::basic_ostream<char, std::char_traits<char> >&, char const*) ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status $ Trying with the suggested options: $ g++ -bnoqiuet test.cpp -o testcpp g++: couldn't run 'noqiuet-gcc-4.0.0': No such file or directory $ g++ -bloadmap test.cpp -o testcpp g++: couldn't run 'loadmap-gcc-4.0.0': No such file or directory $ g++ test.cpp -bnoquiet -o testcpp g++: '-b' must come at the start of the command line Any clues on how to get on? Thanks. |
|
|||
|
"Huub" <"v.niekerk at hccnet.nl"> schrieb im Newsbeitrag
news:[email protected] ll.nl... > Hi, > > Running AIX 5.3, I'm trying to compile a short piece of code in C++: > > #include <iostream> > > using namespace std; > > int main() > { > cout << "Dit is AIX 5.3 - C++\n"; > } > > Compilation: > > $ g++ test.cpp -o testcpp > ld: 0711-317 ERROR: Undefined symbol: .std::basic_ostream<char, > std::char_traits<char> >& std: perator<< <std::char_traits<char>> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more > information. > collect2: ld returned 8 exit status > $ Hi I had the same problem a few days ago. After some research I decided to upgrade the gcc version. IIRC there is a workarround for the problem. But it is has one or more disadvantages. You can find the solution, if you google for it. > > Trying with the suggested options: > $ g++ -bnoqiuet test.cpp -o testcpp > g++: couldn't run 'noqiuet-gcc-4.0.0': No such file or directory > $ g++ -bloadmap test.cpp -o testcpp > g++: couldn't run 'loadmap-gcc-4.0.0': No such file or directory > $ g++ test.cpp -bnoquiet -o testcpp > g++: '-b' must come at the start of the command line > > Any clues on how to get on? > Thanks. 1. There is a typo. 2. -bnoquiet and -bloadmap are linker options. You have to use it like "g++ -Wl,-bnoquiet test.cpp -o testcpp". Regards, Chris |
|
|||
|
> Hi
> > I had the same problem a few days ago. After some research I decided to > upgrade the gcc version. I'm using the latest gcc version from the online Toolbox. > IIRC there is a workarround for the problem. But it is has one or more > disadvantages. You can find the solution, if you google for it. > I searched the net and found numerous hits, but none seemed to fit my case. > >> Trying with the suggested options: >> $ g++ -bnoqiuet test.cpp -o testcpp >> g++: couldn't run 'noqiuet-gcc-4.0.0': No such file or directory >> $ g++ -bloadmap test.cpp -o testcpp >> g++: couldn't run 'loadmap-gcc-4.0.0': No such file or directory >> $ g++ test.cpp -bnoquiet -o testcpp >> g++: '-b' must come at the start of the command line >> >> Any clues on how to get on? >> Thanks. > > 1. There is a typo. Which one? > 2. -bnoquiet and -bloadmap are linker options. You have to use it like > "g++ -Wl,-bnoquiet test.cpp -o testcpp". Oh, ok. Had no idea... Thanks. |