trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: January 2012

Re: [trinity-devel] "undefined reference to" error

From: Darrell Anderson <humanreadable@...>
Date: Sun, 1 Jan 2012 12:31:48 -0800 (PST)
> Slowly, ever so slowly, I'm trying to
> learn C++. I have this Big Fat Book on my desk and almost
> every day I read, tinker, and study code.
> 
> While trying to compile koffice I ran into these fatal
> errors:
> 
> ../../.libs/libkexidb.so: undefined reference to
> `KexiDB::Parser::~Parser()'
> ../../.libs/libkexidb.so: undefined reference to
> `KexiDB::Parser::statement() const'
> ../../.libs/libkexidb.so: undefined reference to
> `KexiDB::Parser::parse(QString const&)'
> ../../.libs/libkexidb.so: undefined reference to
> `tname(int)'
> ../../.libs/libkexidb.so: undefined reference to
> `KexiDB::Parser::Parser(KexiDB::Connection*)'
> ../../.libs/libkexidb.so: undefined reference to
> `KexiDB::Parser::query()'
> 
> If the g++ error lists a line in a *.cpp file, then usually
> the "undefined reference to" error means a missing header
> file that declares the namespace or function.
> 
> In this particular error, g++ listed a static library. From
> what I've read, this means something is awry in the linking
> process and not in the code itself. Am I on the right
> track?
> 
> If not then please set me straight. :)
> 
> If yes, then how do I fix the error? I presume something in
> the Makefiles? Does the error provide me clues as to where I
> need to fix the problem?
> 
> Trying to learn! Thanks!

Anybody?

Darrell