LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-11-2005, 09:41 AM   #1
ChemicalBurn
LQ Newbie
 
Registered: Feb 2005
Posts: 28

Rep: Reputation: 15
Undefined Reference


Im using Suse 9.1 and Kdevelop 3.1. Im building on top of an already existing library for a software, some applications have been built using this same library and they work perfectly fine. But when I use the same templates and classes, upon declaring some types I get errors such as: main.o(.text+0x27b): In function `main':
: undefined reference to `InputReader::InputReader[in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_ostream<char, std::char_traits<char> >&, std::basic_filebuf<char, std::char_traits<char> >*, int)'
main.o(.text+0x2bc): In function `main':
: undefined reference to `InputReader::~InputReader [in-charge]()'

Although some other types work fine. But I do have the header file "InputReader" included, and I declare and initialize the object just as it was declared and initialized in the working applications, but it still gives me this error.
Im hoping this has happened to someone before, because its been staring me in the face for days now. Can anyone help?
Thanks.
 
Old 02-11-2005, 02:07 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
Do you have multiple namespaces? It looks like the link editor thinks InputReader is in another namespace.
 
Old 02-14-2005, 03:01 AM   #3
ChemicalBurn
LQ Newbie
 
Registered: Feb 2005
Posts: 28

Original Poster
Rep: Reputation: 15
no, I only have one namespace. Well one namespace other than the namespace std...
But the namespace Im including does not appear in the namespace folder of my project, I'm including a namespace that is declared simply in the code that I am using.
Meaning, I have a whole library I'm using for graph and graph manipulation, and they are all in the name space Graph...
I guess I have to do something more, now that you mentioned it....
 
  


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, why? george_mercury Programming 4 05-07-2009 12:15 AM
undefined reference to `XF86VidModeGetModeLine' apokryphos Linux - General 1 08-07-2005 06:40 PM
undefined reference mp4-10 Programming 3 01-25-2005 12:38 PM
undefined reference to 'request_irq()' deimosSan Programming 2 11-10-2003 08:15 AM
Yet another 'undefined reference' problem faulpelz2 Linux - Software 3 04-04-2003 11:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:24 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
Open Source Consulting | Domain Registration