Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Build *both* static and dynamic libs

Build *both* static and dynamic libs

Scheduled Pinned Locked Moved General and Desktop
6 Posts 5 Posters 4.8k Views
  • 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.
  • J Offline
    J Offline
    jsshapiro
    wrote on 29 May 2012, 20:40 last edited by
    #1

    I'd like to set up a project that will build both static and dynamic versions of a library. There are no Qt dependencies here anywhere.

    It looks to me as if I might be able to do something like:

    CONFIG += staticlib
    CONFIG += dll

    But if I do this, then only the DLL version gets built. Is "dll" overriding "staticlib" here?

    I'm clearly doing something very obvious wrong. Can somebody sort me out here?

    Thanks!

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 30 May 2012, 20:42 last edited by
      #2

      staticlib and dll are mutually exclusive. The last one that is set should win.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on 31 May 2012, 08:10 last edited by
        #3

        Does "CONFIG+=static_and_shared" work?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aabc
          wrote on 31 May 2012, 12:00 last edited by
          #4

          Can I compile with Qt libraries staticly ?

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on 31 May 2012, 14:14 last edited by
            #5

            [quote author="aabc" date="1338465608"]Can I compile with Qt libraries staticly ?[/quote]
            Yes. You can create your own static Qt libs and use them. You can also have your own static libs and use them with standard Qt dll/libs.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aabc
              wrote on 31 May 2012, 14:16 last edited by
              #6

              I mean How can I compile my application with Qt libs (like QtGui, QTCore etc.) staticly (QtGui.lib and not QtGui.dll)

              1 Reply Last reply
              0

              1/6

              29 May 2012, 20:40

              • Login

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