Message: previous - next
Month: January 2012

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

From: /dev/ammo42 <mickeytintincolle@...>
Date: Mon, 2 Jan 2012 20:26:19 +0100
On Fri, 30 Dec 2011 20:27:24 -0800 (PST)
Darrell Anderson <humanreadable@...> wrote:

> 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/ undefined reference to
> `KexiDB::Parser::~Parser()' ../../.libs/ undefined
> reference to `KexiDB::Parser::statement()
> const' ../../.libs/ undefined reference to
> `KexiDB::Parser::parse(QString const&)' ../../.libs/
> undefined reference to `tname(int)' ../../.libs/
> undefined reference to
> `KexiDB::Parser::Parser(KexiDB::Connection*)' ../../.libs/
> 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?
You need to add the library containing the missing symbols to the
linker flags.
> Trying to learn! Thanks!
> Darrell
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> trinity-devel-unsubscribe@... For additional
> commands, e-mail: trinity-devel-help@... Read
> list messsages on the Web archive:
> Please remember not to
> top-post: