0

I have a qt library project that I want to use in several Qt application projects. The application project however should build the library as well, if its not already built. Is that possible?

The accepted answer in the following question shows how to create the library and application projects. I guess one has to build the library first before one can use them in the application projects: What is the easiest way to reference libraries in Qt projects?

4

2 回答 2

1

我通过使用 subdirs 模板找到了另一种方法:我现在有一个带有 TEMPLATE=subdirs 的 pro 文件,其中列出了我想要构建的不同 pro 文件。

subdirs pro 文件就像 Visual Studio 中的解决方案文件。

于 2013-05-15T12:55:15.973 回答
0

您需要设置项目依赖项。如果使用 Qt Creator:-

http://doc.qt.digia.com/qtcreator-2.2/creator-build-dependencies.html

否则,您可以直接编辑 .pro 文件并执行以下操作:-

http://dev.modmancer.com/index.php/2010/11/14/qmake-building-dependencies/

于 2013-05-13T14:20:15.900 回答