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. How to detect if compiling on 32 bit or 64 bit platform in .pro file?
Forum Updated to NodeBB v4.3 + New Features

How to detect if compiling on 32 bit or 64 bit platform in .pro file?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 2.3k 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.
  • brucezcgB Offline
    brucezcgB Offline
    brucezcg
    wrote on last edited by
    #1
    How can I know if compiling on 32 bit or 64-bit platform in .pro file?
    When I choose 64bit compiler:
    in the .pro file
    

    CONFIG(release, debug|release) {
    QMAKE_POST_LINK += copy .\release\.lib ..\..\sdk_v2_demo\sdk\lib\x64 &
    QMAKE_POST_LINK += copy .\release\
    .dll ..\..\sdk_v2_demo\sdk\lib\x64 &
    }
    and the 32bit:
    CONFIG(release, debug|release) {
    QMAKE_POST_LINK += copy .\release\.lib ..\..\sdk_v2_demo\sdk\lib\x86 &
    QMAKE_POST_LINK += copy .\release\
    .dll ..\..\sdk_v2_demo\sdk\lib\x86 &
    }

    jsulmJ 1 Reply Last reply
    0
    • brucezcgB brucezcg
      How can I know if compiling on 32 bit or 64-bit platform in .pro file?
      When I choose 64bit compiler:
      in the .pro file
      

      CONFIG(release, debug|release) {
      QMAKE_POST_LINK += copy .\release\.lib ..\..\sdk_v2_demo\sdk\lib\x64 &
      QMAKE_POST_LINK += copy .\release\
      .dll ..\..\sdk_v2_demo\sdk\lib\x64 &
      }
      and the 32bit:
      CONFIG(release, debug|release) {
      QMAKE_POST_LINK += copy .\release\.lib ..\..\sdk_v2_demo\sdk\lib\x86 &
      QMAKE_POST_LINK += copy .\release\
      .dll ..\..\sdk_v2_demo\sdk\lib\x86 &
      }

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @brucezcg Try one of the suggested solutions: https://stackoverflow.com/questions/356666/identifier-for-win64-configuration-in-qmake

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

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