Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
/MyFolder/main.o:: In function 'main':
/MyFolder/main.cpp:8: error: undefined reference to 'QwtPlot::QwtPlot(QWidget*)'
:: error: collect2: ld returned 1 exit status
|
Operating system: Ubuntu 10.04 LTS Lucid Lynx
IDE: Qt Creator 2.0.0
Project type: Console Application
Libraries used:
#------------------------------------------------- |
#include <QApplication> |
Do not link to qwt, but to qwt-qt. You will also need to link to QtSvg (otherwise the Undefined reference to 'QGraphicsItemPrivate::height() const' link error occurs).
Change the Qt Creator project file to the following:
#-------------------------------------------------
#
# Project created by QtCreator 2010-07-21T19:21:43
#
#-------------------------------------------------
QT += core gui
TARGET = CppQwtExample1
TEMPLATE = app
SOURCES += main.cpp
LIBS += -L/usr/local/lib -lqwt-qt4
LIBS += -L/usr/local/lib -lQtSvg
|
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.