LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 12-02-2006, 01:03 PM   #1
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 54
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
 
Old 12-02-2006, 10:51 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 59
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.
 
Old 12-03-2006, 01:40 PM   #3
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Original Poster
Rep: Reputation: 54
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!
 
Old 12-03-2006, 05:42 PM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined reference to: ashlesha Programming 5 11-08-2006 02:07 PM
undefined reference? Sharky01252 Programming 3 11-07-2006 12:36 PM
undefined reference vkmgeek Programming 1 05-11-2006 07:37 AM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 04:01 AM
undefined reference mp4-10 Programming 3 01-25-2005 01:38 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration