RRR
RRR

Reputation: 4175

Qt .pro file: adding path which includes "include" directory doesn't work

I am including new files in my Qt project. The header files are installed by another application in a path like this:

INCLUDEPATH += <path>\\include

The problem is that Qt recognizes the include as a reserved word, and does not recognizes the header files in this folder. When I rename the folder to Include or include2 - everything works well, the files of this folder are imported successfully.

I do not want to change the folder name because every other user that will want to compile my application will have to do this too. Can anyone please suggest me other solution?

Thanks!

Upvotes: 2

Views: 5659

Answers (3)

sara
sara

Reputation: 3934

Had the same problem.

Just add $$quote, and put the path in braces.

For example:

$$quote(C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include)

Upvotes: 2

Tishka17
Tishka17

Reputation: 320

Try using / as separator symbol: INCLUDEPATH += "<path>/include"

Upvotes: 0

Vishnu Kanwar
Vishnu Kanwar

Reputation: 781

use

INCPATH  = -I/<path>/include

or specify each file explicitly

 HEADERS =   include/menuinterface.h \
             include/editormenuinterface.h \
             include/schematicmenuint
             ...

Upvotes: 0

Related Questions