LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
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
 
Thread Tools
Old 02-11-2005, 10:41 AM   #1
ChemicalBurn
LQ Newbie
 
Registered: Feb 2005
Posts: 28
Thanked: 0
Undefined Reference


[Log in to get rid of this advertisement]
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.
ChemicalBurn is offline     Reply With Quote
Old 02-11-2005, 03:07 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964
Thanked: 0
Do you have multiple namespaces? It looks like the link editor thinks InputReader is in another namespace.
jim mcnamara is offline     Reply With Quote
Old 02-14-2005, 04:01 AM   #3
ChemicalBurn
LQ Newbie
 
Registered: Feb 2005
Posts: 28
Thanked: 0

Original Poster
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....
ChemicalBurn is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 02:10 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration