Discussion Locked

GCC3 bugs

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

yo

I'm using the gcc3 c and c++ compiler through unix on my Mac
OS 10.3 laptop. C works perfectly with this compiler, but every
time I try to compile c++ I get errors. I'm using a piece of IDE
software that can handle the C++ compilation, but it's really
starting to bug me that I can't compile c++ like I should be able
to. To test this out, I wrote a sample app:

//test.cpp

#include

using namespace std;

int main(void){

cout<<"Test\n";

return 0;

}//end main

I see know problem's with this src code. The compiler returns
the following error:

ld: Undefined symbols:
std::ios_base::Init::Init[in-charge]()
std::ios_base::Init::~Init [in-charge]()
std::cout
std::basic_ostream >& std::
operator<< >(std::basic_ostream >&, char const*)
___gxx_personality_v0

anyone know whats going on??

2 replies

by tehilinski

My guess is that a wrong library is loaded, or a library load failed. Perhaps explicitly add loading the correct C++ lib with -lstdc++ ?
If this works, add it permanently to CXXFLAGS or CFLAGS.
Might also be fixed in the most recent distro for Mac OS (or you can build it yourself from source.)

This discussion is closed to new replies.