Domanda

I'm using Qt 5.1.1 and running qmake on windows.

I run qmake with the following command:

qmake.exe -spec win32-msvc2012 -tp vc project.pro

Somehow in my makefile it generates some weird relative paths:

INCPATH = -I"..\..\..\qt\qwt-6.1.0\src"

for example.

My includepaths in the .pro file are the following:

INCLUDEPATH += \
$$PWD \
$$QWTDIR \

what did I do wrong? (The compiler searches for ......\ which it isn't allowed to access for sure)

qwtdir is defined as:

QWTDIR = C:/qt/qwt-6.1.0/src
È stato utile?

Soluzione

I resolved the error. Someone committed corrupted .pri file which didn't contain a proper line break after an include i.e.:

HEADERS += \
$$PWD/file1.h \ $$PWD/file2.h

Adding a proper line break solved the issue.

Altri suggerimenti

INCLUDEPATH += $$PWD is most likely unnecessary.

Your $$QWTDIR is relative, most likely - you'd need to relent and show it to us. Use $$absolute_path($${QWTDIR}).

You could also probably put the include paths all on one line. The trailing line continuation in the last line of INCLUDEPATH is wrong, you must remove it:

INCLUDEPATH += \
$$PWD \
$$QWTDIR

You are trying to build against the source tree of Qwt ( probably copying the project files of the Qwt examples ) instead of installing Qwt properly and building against the installed version using:

CONFIG += qwt

See http://qwt.sourceforge.net/qwtinstall.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top