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. pro-file: force link with static library
QtWS25 Last Chance

pro-file: force link with static library

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 862 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.
  • D Offline
    D Offline
    debian
    wrote on last edited by
    #1

    Hello, I use Qt-5.11.1 and QWebSockets, for this I add QT += websockets to pro-file.
    I can build shared and static libQt5WebSockets, but how can I force link with static library in pro-file?
    Thank you excuse my bad english.

    raven-worxR 1 Reply Last reply
    0
    • D debian

      Hello, I use Qt-5.11.1 and QWebSockets, for this I add QT += websockets to pro-file.
      I can build shared and static libQt5WebSockets, but how can I force link with static library in pro-file?
      Thank you excuse my bad english.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @debian said in pro-file: force link with static library:

      I can build shared and static libQt5WebSockets, but how can I force link with static library in pro-file?

      it depends which Qt kit you are using in the end. The linked lib decides if it's static or dynamic.
      You can't mix them anyway in a single Qt installation.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      D 1 Reply Last reply
      1
      • raven-worxR raven-worx

        @debian said in pro-file: force link with static library:

        I can build shared and static libQt5WebSockets, but how can I force link with static library in pro-file?

        it depends which Qt kit you are using in the end. The linked lib decides if it's static or dynamic.
        You can't mix them anyway in a single Qt installation.

        D Offline
        D Offline
        debian
        wrote on last edited by
        #3

        @raven-worx sorry, I not understand.
        If I have both, static and shared, libraries in same directory linker choose shared libraries, how can I force use static library in this case?

        raven-worxR 1 Reply Last reply
        0
        • D debian

          @raven-worx sorry, I not understand.
          If I have both, static and shared, libraries in same directory linker choose shared libraries, how can I force use static library in this case?

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @debian said in pro-file: force link with static library:

          If I have both, static and shared, libraries in same directory linker choose shared libraries, how can I force use static library in this case?

          exactly. why do you have static and dynamic libs in the same folder in the first place?!

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          1
          • D Offline
            D Offline
            debian
            wrote on last edited by
            #5

            Why not?
            So I can't force use static library in pro-file and should story static and shared libraries in different directories?
            Thank you.

            raven-worxR 1 Reply Last reply
            0
            • D debian

              Why not?
              So I can't force use static library in pro-file and should story static and shared libraries in different directories?
              Thank you.

              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #6

              @debian said in pro-file: force link with static library:

              So I can't force use static library in pro-file and should story static and shared libraries in different directories?

              exactly, thats what i already said.
              Your Qt installation should either be compiled dynamic or static.

              the main reason is:
              QT += websockets adds linker commands for a specific lib name to the makefile for build.

              You renamed your static libs and copied them beside the dynamic ones?

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              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