Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Equivalent to Visual Studio's "Link Library Dependencies"?
Forum Updated to NodeBB v4.3 + New Features

Equivalent to Visual Studio's "Link Library Dependencies"?

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AlexDEV.pro
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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
      @

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AlexDEV.pro
        wrote on last edited by
        #3

        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.
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved