LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Undefined reference in C++ program (http://www.linuxquestions.org/questions/programming-9/undefined-reference-in-c-program-506873/)

Komakino 12-02-2006 12:03 PM

Undefined reference in C++ program
 
Hello!

I'm trying to compile a program I wrote a while ago but without much luck.
The error I get is:

Code:

undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)
and I am using g++ 3.4 to compile.

Any suggestions would be welcome.

Thanks,

KK

nadroj 12-02-2006 09:51 PM

can you post the other relevant code such as the block of code this function is used in as well as its definition (if its not a standard C++ function)? maybe even the whole thing if not overly long so we can test it ourself and try and debug, if need be.

Komakino 12-03-2006 12:40 PM

Quote:

Originally Posted by nadroj
can you post the other relevant code such as the block of code this function is used in as well as its definition (if its not a standard C++ function)? maybe even the whole thing if not overly long so we can test it ourself and try and debug, if need be.

Thanks for your response, but I sussed it. Turned out a couple object files were already compiled with a different libstdc++ and didn't like linking with another file just created with a newer version. Deleting all .o files and running Make again solved the problem. But thanks for your interest!

nadroj 12-03-2006 04:42 PM

well glad you got it, cause i wouldnt have guessed that was the problem!


All times are GMT -5. The time now is 07:34 AM.