hub2
hub2

Reputation: 11

Qt Creator include path

I'm making a project in Qt Creator and I wanted to add include path so I added to .pro file this:

INCLUDEPATH +=  "C:\Program Files (x86)\MySQL\MySQL Connector C++ 1.1.2\include\"

I tried also replacing \ with \\\. How should I add this?

Upvotes: 0

Views: 5931

Answers (3)

Alex Maltsev
Alex Maltsev

Reputation: 81

Use custom command for qmake in Projects/Build/Build Steps section in "Additional arguments" like this: "QT+=your_qt_modules" "DEFINES+=your_defines"

I think that you can use any command from *.pro files in that way.

Upvotes: 0

NG_
NG_

Reputation: 7181

Do as here In a qt project, how to add include path to pro under windows where the path contains space. Don't forget to save your .pro file after modification.

Good luck!

Upvotes: 1

Casey
Casey

Reputation: 42584

You need to quote items containing spaces in qmake variables with $$quot():

INCLUDEPATH += $$quot(C:\Program Files (x86)\MySQL\MySQL Connector C++ 1.1.2\include\)

Upvotes: 0

Related Questions