Problem including custom library [message #651817] |
Tue, 01 February 2011 12:30  |
Eclipse User |
|
|
|
Hi,
I'm using Helios, 3.6.1, in Ubuntu 10.04.
I created a library.so using CDT and now I intend to use it in another project (which also includes a Qt interface).
I copied the library.so file into a folder of the project called libs.
In project->properties->C/C++ Include Path I added that folder.
In project->properties->C/C++ Project Paths->Libraries I added the library.so file.
The g++ line looks like this:
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Ilibs -Idebug -I. -o debug/main.o main.cpp
The references in the project to objects from the library are tagged as errors (does not name a type), and the inclusions of classes from that library as well (no such file or directory).
The main problem (and therefore the essence of my doubt here) is how inclusions of external libraries work in CDT. I've read the manuals and tried all solutions I found online, but usually the version of eclipse is different from mine (and I don't have the same menu options).
Once I solve this I still have to work out how to make the library usable by Qt, but that's my problem (now I'm just whining a little).
Thanks to anyone even reading this.
|
|
|
|
|
|
|
|
Re: Problem including custom library [message #652226 is a reply to message #652215] |
Thu, 03 February 2011 03:52  |
Eclipse User |
|
|
|
OK, problem solved.
It was indeed a Qt problem, so apologies for the out-of-topic.
As a matter of fact, I missed the header files. I thought that adding the .so library was enough, but seems like the .h are also necessary. Coping them to the libs folder made the trick.
Thanks for your time Axel.
|
|
|
Powered by
FUDForum. Page generated in 0.03670 seconds