I have a project I'm working on in Qt creator that requires a third-party library. I want to add the headers to the include path for the project. How do I do this?
相关问题
- Highlight parent path to the root
- How to get a fixed number of evenly spaced points
- How to include FFI in OS X?
- Python os.path.commonprefix - is there a path orie
- Using relative url for [removed] in child iframe
相关文章
- linux / libusb get usb device path
- How to get server path of physical path ?
- Identify which file has included some particular h
- Why ContextClassLoader returns path with exclamati
- libxml2.2.dylib reference in python program
- How can I resolve a relative path to absolute path
- How to make QtLinguist shipped with Qt 5.9.1 work?
- String concatenation for include path
If you are using qmake, the standard Qt build system, just add a line to the
.pro
file as documented in the qmake Variable Reference:If you are using your own build system, you create a project by selecting "Import of Makefile-based project". This will create some files in your project directory including a file named
<your project name>.includes
. In that file, simply list the paths you want to include, one per line. Really all this does is tell Qt Creator where to look for files to index for auto completion. Your own build system will have to handle the include paths in its own way.As explained in the Qt Creator Manual,
<your path>
must be an absolute path, but you can avoid OS-, host- or user-specific entries in your.pro
file by using$$PWD
which refers to the folder that contains your.pro
file, e.g.To add global include path 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.
For anyone completely new to Qt Creator like me, you can modify your project's .pro file from within Qt Creator:
Just double-click on "your project name".pro in the Projects window and add the include path at the bottom of the .pro file like I've done.