Incorporating External Libraries into Qt Creator Projects
Adding external libraries to a project created with Qt Creator RC1 (version 0.9.2) requires specific steps for successful integration. This guide will walk you through the process using the example of including the Psapi.lib library for accessing the EnumProcesses() function.
Adding the External Library
To add an external library to your project, modify your project's ".pro" file and specify the library's path and name:
LIBS += -L/path/to -lpsapi
Breakdown:
Note: If the library is stored within the project directory, use the $$_PRO_FILE_PWD_ variable to reference its location:
LIBS += -L"$$_PRO_FILE_PWD_/3rdparty/libs/" -lpsapi
This ensures platform compatibility, allowing your project to build correctly across various platforms supported by Qt.
The above is the detailed content of How Do I Add External Libraries (e.g., Psapi.lib) to My Qt Creator Project?. For more information, please follow other related articles on the PHP Chinese website!