PDA

View Full Version : Problem using QWT shared library



klenze
28th November 2011, 13:28
Hi,


I want to use QWT library to display plots. But I´ve a problem to integrate qwt in my application.
I build the qwt shared library by executing
qmake && make.
Afterwards I copied the libs to a subfolder in my project.

This is a snippet of my pro file:


DEPENDPATH += ../libs/lib/shared
INCLUDEPATH += ../libs/include
LIBS += -L../libs/lib/shared -lqwt -lqwtmathml


and this is a snippet of my source file:


int main(int argc, char **args)
{

QwtPlot *plot = new QwtPlot;

plot->setTitle("Das ist ein Test");
}



During compiling I get this error:

../GrindingWheelWearSimulationTool/lib/shared/libqwt.so: undefined reference to `QwtPlot::applyProperties(QString const&)'
../GrindingWheelWearSimulationTool/lib/shared/libqwt.so: undefined reference to `QwtPlot::grabProperties() const'
collect2: ld gab 1 als Ende-Status zurück

The problem is independant of using the shared or the static library.

How can I solve this error?

Thanks
Micha

klenze
5th December 2011, 10:39
Ok, I found a solution.

After adding the library path to LD_LIBRARY_PATH, it works.