Equivalent to Visual Studio's "Link Library Dependencies"?
In c++ project properties in Visual Studio there is "Link Library Dependencies" option in Configuration Properties -> Librarian -> General. I have project with several lib dependencies which output is also lib. If this option is Yes, outputed lib has large file size, otherwise not. Now i converted this c++ project to QT project and every time I build project in QT I'm getting small file size lib. How to link dependencies to get them in output lib?
Compile your dependent libraries statically and include those files in the .pro file. If that is not enough, you can try adding this to .pro file:
CONFIG += staticlib
Thanks for the answer, but it did not help. Added "CONFIG += staticlib" to all subprojects .pro's, added same to main .pro, added all libs to main .pro and to subproject the output of which must be a library containing all the other libraries.
Maybe it's not a trivial situation? The project consists of many sub-projects:
- Static libs,
- Static library, which should include all other static libs
- Exe, to which should be connected only a single library that contains all the other static libs and in such a way must be used all the functionality of libraries.
Hi and welcome to devnet,
What you can do is create a pri file that contains the linking informations for each of your library. Then in the other projects using them, include that pri file.