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!
Darrell
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
On Fri, 30 Dec 2011 20:27:24 -0800 (PST) Darrell Anderson humanreadable@yahoo.com 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/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?
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@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messsages on the Web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
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?
You need to add the library containing the missing symbols to the linker flags.
Thanks so much for helping. This is causing headaches. :)
I more or less figured out there is a linking problem, but I don't know what needs to be linked, what files to edit, or what command line parameters to pass.
The undefined reference to "KexiDB::" implies a class or namespace (still learning terminology!), but in which *.cpp or *.h file? My guess is I don't need to edit any *.cpp or *.h file but the problem is caused by the stricter compiling standards of the newer GCCs.
How do I read my build log to know which library is the one that needs to be linked? The way I read the errors (and I could be way wrong :) ), is the linker sees libkexidb.so with some references that the linker can't find. Does the build log provide me that information?
If koffice could be built in separate packages chasing this bug would not be so demoralizing. Building koffice takes about 1 hour 49 minutes on my system. The failure occurs at about 1 hour 30 minutes. I have posted list questions how to build koffice differently but received no responses yet.
I want to build koffice mostly to have access to KWord, but I want like to know how to build kofffice with any component removed. There also is a configure statement in the build log about building kexi separately, but I don't know how to set my configure options to do that. If I could then I would save much time by just building kexi because that is where the failure lies.
Darrell
On Monday 02 January 2012 03:06:52 pm Darrell Anderson wrote:
The undefined reference to "KexiDB::" implies a class or namespace (still
learning terminology!), but in which *.cpp or *.h file?
cd to the source directory then grep -r "KexiDB::" *
See if you get a hit.
On Mon, 2 Jan 2012 15:21:39 -0500 Baho Utot baho-utot@columbus.rr.com wrote:
On Monday 02 January 2012 03:06:52 pm Darrell Anderson wrote:
The undefined reference to "KexiDB::" implies a class or namespace (still
learning terminology!), but in which *.cpp or *.h file?
cd to the source directory then grep -r "KexiDB::" *
I'd rather grep "Parser::~Parser()" since namespaces can be delimited by something like namespace KexiDB { Parser::~Parser() { // the function } } which wouldn't be detected by your grep command.
See if you get a hit.
To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messsages on the Web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
The undefined reference to "KexiDB::" implies a
class or namespace
(still
learning terminology!), but in which *.cpp or *.h
file?
cd to the source directory then grep -r "KexiDB::" *
I'd rather grep "Parser::~Parser()" since namespaces can be delimited by something like namespace KexiDB { Parser::~Parser() { // the function } } which wouldn't be detected by your grep command.
See if you get a hit.
Thanks both for helping!
Actually, Several days ago I did what both of you suggested. :)
I just don't know what to do next. (Newbie!)
Searching for KexiDB:: results in overload. Too many. Further, the KexiDB class/namespace is used in many *.cpp files.
All of the errors seem to be located from within kexi/kexidb/parser/parser.cpp.
../../.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()'
Thanks!
Darrell
On Mon, 2 Jan 2012 18:30:23 -0800 (PST) Darrell Anderson humanreadable@yahoo.com wrote:
The undefined reference to "KexiDB::" implies a
class or namespace
(still
learning terminology!), but in which *.cpp or *.h
file?
cd to the source directory then grep -r "KexiDB::" *
I'd rather grep "Parser::~Parser()" since namespaces can be delimited by something like namespace KexiDB { Parser::~Parser() { // the function } } which wouldn't be detected by your grep command.
See if you get a hit.
Thanks both for helping!
Actually, Several days ago I did what both of you suggested. :)
I just don't know what to do next. (Newbie!)
I looked at the Makefile.am files and actually there are two libraries: -libkexidb.so, which contains the .cpp files of the kexidb/ directory -libkexidbparser.so, which contains the .cpp files of the kexidb/parser/ directory and libkexidb.so apparently can't be used without libkexidbparser.so. I think the solution is to add "-lkexidbparser" to the failing linker commands, and, if it isn't already done, to make libkexidb.so depend on libkexidbparser.so.
Searching for KexiDB:: results in overload. Too many. Further, the KexiDB class/namespace is used in many *.cpp files.
All of the errors seem to be located from within kexi/kexidb/parser/parser.cpp.
../../.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()'
Thanks!
Darrell
To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messsages on the Web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
I just don't know what to do next. (Newbie!)
I looked at the Makefile.am files and actually there are two libraries: -libkexidb.so, which contains the .cpp files of the kexidb/ directory -libkexidbparser.so, which contains the .cpp files of the kexidb/parser/ directory and libkexidb.so apparently can't be used without libkexidbparser.so. I think the solution is to add "-lkexidbparser" to the failing linker commands, and, if it isn't already done, to make libkexidb.so depend on libkexidbparser.so.
Do you know how to build just kexi? As that is where the problem lies, and the failure occurs within the final minutes of fully building koffice, I could save some troubleshooting time by just building kexi.
Darrell
On Tue, 3 Jan 2012 08:43:46 -0800 (PST) Darrell Anderson humanreadable@yahoo.com wrote:
I just don't know what to do next. (Newbie!)
I looked at the Makefile.am files and actually there are two libraries: -libkexidb.so, which contains the .cpp files of the kexidb/ directory -libkexidbparser.so, which contains the .cpp files of the kexidb/parser/ directory and libkexidb.so apparently can't be used without libkexidbparser.so. I think the solution is to add "-lkexidbparser" to the failing linker commands, and, if it isn't already done, to make libkexidb.so depend on libkexidbparser.so.
Do you know how to build just kexi? As that is where the problem lies, and the failure occurs within the final minutes of fully building koffice, I could save some troubleshooting time by just building kexi.
I don't know either, but at this time I think it is better to let the real experts take care of the autotools files since the problem is now precisely determined. Also, did François Andriot build KOffice on RH/Fedora platforms ? The linker problems look like the ones he experienced (and fixed) while building Trinity on RH/Fedora.
Darrell
To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messsages on the Web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting