I was using MSVC++ to compile my qt codes and I decided to use QtCreator from now on
however the problem is I can't compile my existing code in this enviroment. I also use qwt dlls in my code and I couldn't get it to work although I added the lib path just like you said to the PATH variable.
The error I get is:
error: undefined reference to `QwtPlotGrid::enableXmin(bool)'
... many other qwt components but the same error
error: undefined reference to`QwtPlotMarker::setXValue(double)'
error: undefined reference to `QwtPlotGrid::enableXmin(bool)'
... many other qwt components but the same error
To copy to clipboard, switch view to plain text mode
these errors are raising from a cpp file which includes (everything I use, and it was enough for MSVC++ enviroment ) :
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_zoomer.h>
#include <qwt_legend.h>
#include <qwt_plot_marker.h>
#include <qwt_symbol.h>
#include <qwt_legend_item.h>
#include <qwt_plot_grid.h>
#include <qwt_painter.h>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_zoomer.h>
#include <qwt_legend.h>
#include <qwt_plot_marker.h>
#include <qwt_symbol.h>
#include <qwt_legend_item.h>
#include <qwt_plot_grid.h>
#include <qwt_painter.h>
To copy to clipboard, switch view to plain text mode
interestingly intelli-sense recognize all of these variables..
anyways here is the .pro file I'm using:
TARGET = myProgramsName
CONFIG += qt thread release console
CONFIG -= flat
CONFIG -= console
QT += xml
MOC_DIR = moc
UI_DIR = UI
FORMS += allmyUIFiles
RESOURCES += source/GUI/ui.qrc
win32 {
RC_FILE = source/GUI/mcmm-gui.rc
INCLUDEPATH += d:/qt-all-opensource-src-4.4.0/qwt-5.1.1/include/
LIBS += -L"source\mcmm" -lqwt5 \
}
HEADERS += paths of all headers files..
SOURCES += paths of all my source codes..
TARGET = myProgramsName
CONFIG += qt thread release console
CONFIG -= flat
CONFIG -= console
QT += xml
MOC_DIR = moc
UI_DIR = UI
FORMS += allmyUIFiles
RESOURCES += source/GUI/ui.qrc
win32 {
RC_FILE = source/GUI/mcmm-gui.rc
INCLUDEPATH += d:/qt-all-opensource-src-4.4.0/qwt-5.1.1/include/
LIBS += -L"source\mcmm" -lqwt5 \
}
HEADERS += paths of all headers files..
SOURCES += paths of all my source codes..
To copy to clipboard, switch view to plain text mode
I guess the key thing is here the INCLUDEPATH and LIBS
I copied qwt5.lib to my source folder thinking that giving the full path instead would be causing the problem, however didn't solve anything..
I've also tried (Instead of the "-L" and "-l" tags):
LIBS += source\mcmm\qwt5.lib
LIBS += source\mcmm\qwt5.lib
To copy to clipboard, switch view to plain text mode
I'm a little bit lost here, please help!
Bookmarks