PDA

View Full Version : qwt_thermo.h : no such file or directory



DynamX
16th February 2018, 20:06
Hello,

I have downloaded and installed qwt, I made a QwtThermo like this :

.pro
12771

Then .pro and .cpp below :

#-------------------------------------------------
#
# Project created by QtCreator 2018-02-07T17:08:47
#
#-------------------------------------------------
# QWT library

QT += core gui

INCLUDEPATH += /usr/local/qwt-6.1.2/include
LIBS += -L/usr/local/qwt-6.1.2/lib -lqwt

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = sans_titre
TEMPLATE = app


SOURCES += main.cpp\
widget.cpp

HEADERS += widget.h

FORMS += widget.ui


.cpp


#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
}

Widget::~Widget()
{
delete ui;
}

void Widget::On_Slide_Changed(int value)
{
}

But I have an error :

qwt_thermo.h : no such file or directory

d_stranz
16th February 2018, 20:24
On Windows, the Qwt 6.1.3 include files unpack to "qwt-6.1.3/src", not "qwt-6.1.3/include". There is no "include" directory. I am pretty sure it is the same for 6.1.2 and for distros on other platforms. Change your INCLUDEPATH in the .pro file and run qmake again.

The error you are getting is because your "ui_*.h" file (created from your .ui file by UIC) references the qwt_thermo.h file.

DynamX
17th February 2018, 19:57
Sorry I forgot to precise, I'm on Linux Ubuntu.
It's not the same thing as Windows

Uwe
18th February 2018, 08:40
On Windows, the Qwt 6.1.3 include files unpack to "qwt-6.1.3/src", not "qwt-6.1.3/include". There is no "include" directory
Qwt packages do not contain any include directory - on no platform - so there is nothing special about Windows.
The include directory is the result of the "make install" step - on all platforms.

But when using packages from a distro the distributor often has its own policies, where to put the libs/headers - usually not installing to /usr/local/qwt-x.x.x.

Uwe