Domanda

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!

È stato utile?

Soluzione

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)

Altri suggerimenti

use

INCPATH  = -I/<path>/include

or specify each file explicitly

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

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

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