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. Linking dynamic libraries for more architectures

Linking dynamic libraries for more architectures

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 714 Views 2 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.
  • V Offline
    V Offline
    vlada
    wrote on last edited by
    #1

    Hi,

    now that Qt 5.12 brings support for 64bit, I would like to build 64bit releases of my app. Currently I have a dynamically loaded library added to my project like this:

    TAGLIBDIR = $$quote($$PWD/3rdparty/taglib)
    INCLUDEPATH += $$quote($${TAGLIBDIR}/include)
    LIBS += -L$$quote($${TAGLIBDIR}/lib) -ltag
    

    It works like this for my Linux, Windows and Anndroid builds. Mainly because the name of the Windows and Android libraries are different. But now I would like to add 64bit Windows and Android libraries which would have the same name. So I need to put them in another folder or change their names.

    What should be the correct solution? Where should be the libraries located, which names should they have and how the .pro file should be changed?

    Thank you.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You can also add a suffix to your library name. But, IIRC, having 32bit and 64bit subfolders to store them is more common.

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

      V 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        You can also add a suffix to your library name. But, IIRC, having 32bit and 64bit subfolders to store them is more common.

        V Offline
        V Offline
        vlada
        wrote on last edited by
        #3

        @SGaist And how do I distinguish which library should be used for which platform in the project file? Something like this would work?

        win32: {
            LIBS += -L$$quote($${TAGLIBDIR}/lib/x86) -ltag
        }
        win64: {
            LIBS += -L$$quote($${TAGLIBDIR}/lib/x64) -ltag
        }
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          IIRC, something like:

          win32 {
              SUBFOLDER = x86
              contains(QMAKE_TARGET.arch, x86_64) {
                  SUBFOLDER = x64
              }
          
              LIBS += -L$$quote($${TAGLIBDIR}/lib/$$SUBFOLDER)
          }
          
          LIBS +=  -ltag
          

          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
          1

          • Login

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