[Previous: Development of Qt for Symbian Based Applications]
[Qt Creator Manual]
[Next: Tips and Tricks]
Handling External Libraries
The ability to recognize external libraries is not only important for the underlying build system, but also for Qt Creator itself. This ability allows Qt Creator to support code completion and syntax highlighting for external libraries as if they were part of the current project or the Qt library.
The procedure of adding a library to a project, depends on the type of project, which influences the build system used. The following sections describe the the procedure required for each project type.
QMake Projects (the default)
Open your project file (.pro) from the Projects pane. Then, follow the guidelines in the Declaring other Libraries section of the Qt documentation.
If your project successfully builds and links against the external library, syntax completion and highlighting should work.
CMake Projects
In CMake, libraries are usually detected using the FIND_PACKAGE() macro. A couple of them are already being shipped with CMake, they can be found in the Modules directory of your CMake installation. If you provide libraries on your own, you will need to provide your own FindFoo.cmake file. Refer to the CMake FAQ for details.
As with qmake projects, syntax completion and highlighting should work if you can sucessfully build and link against the external library.
Generic Projects
If you import a project using the Generic Projects function, Qt Creator will create a file called <projectname>.includes in your project root directory. This file contains all project subdirectories which Qt Creator could find relevant headers for. Simply add your include pathes here.
In Generic Project mode, Qt Creator will not modify any project settings, so the above is merely a hint for code completion and syntax highlighting.
[Previous: Development of Qt for Symbian Based Applications]
[Qt Creator Manual]
[Next: Tips and Tricks]
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) |
Trademarks |
Qt Creator 1.3.0 |
|