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. Building applications with different library variants (32 / 64 bit)
Forum Updated to NodeBB v4.3 + New Features

Building applications with different library variants (32 / 64 bit)

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 1.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.
  • H Offline
    H Offline
    Helen888
    wrote on last edited by
    #1

    I want to build 32 and 64 bit applications (on Linux). I've got some 3rd party shared libraries that are available as both, 32 and 64-bit versions.

    What's the best way to include a library, depending whether I'm using 32 or 64 kit? Some magic in *.pro file or something else?

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      yoavmil
      wrote on last edited by
      #2

      take a look here

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

        Hi and welcome to devnet,

        If you take a look @yoavmil link, the correct answer is the one from Nejat where he uses QMAKE_HOST to get the architecture information.

        Also take a look at QMAKE_HOST's documentation. The example there uses an additional scope that you can adapt to your situation.

        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
        • J Offline
          J Offline
          janeb
          wrote on last edited by janeb
          #4

          I also came across this post and the SO link before; the same with the QMAKE_HOST documentation. But, I'm a bit confused, I probably must take a step back.

          QMAKE_HOST tells me info about the host / development machine, doesn't it? So, QMAKE_HOST.arch will be the same for that particular machine regardless what the target architecture is, whether it is 32-bit (x86) or 64-bit (x64). Is my reasoning correct?

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

            You right yes. What you would usually do when building for two different architecture of Qt, is use the qmake for that particular version of Qt so this trick works fine.

            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