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. [Cross compilation] Build a 32 app on a 64 bits computer using either CMake or QMake
QtWS25 Last Chance

[Cross compilation] Build a 32 app on a 64 bits computer using either CMake or QMake

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 5.6k 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.
  • mistralegnaM Offline
    mistralegnaM Offline
    mistralegna
    wrote on last edited by
    #1

    Hi,

    I'd like to know if it is possible to compile my application for a 32 bits computer (on Linux) on a 64 bits (also on Linux).

    I would prefer to use CMake, in order to follow my enterprise development rules, but if not possible, I'll move on QMake.

    Thanks to all of you.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Hi,
      this will depend on your compiler you are using. If it is a pure 32bit compiler, there is probably nothing to do. If you have a 64 bit compiler you will have to find the proper compiler option to cross compile.

      You have to setup Qt as for cross compilation to any arbitrary 32 bit platform.

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

      1 Reply Last reply
      0
      • mistralegnaM Offline
        mistralegnaM Offline
        mistralegna
        wrote on last edited by
        #3

        Thanks a lot. I'll try tomorrow.
        But I guess your solution is only available using QMake.
        Have you ever heard about the use of CMake ?

        For the moment, I manage to set the CXXFLAGS to m32 (to force the 32 bits compilation), but I didn't found how to link with the lib32 Qt libraries. Excuse the fact my post perhaps would be better on the forum of CMake website ;)

        Thanks !

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          It's a matter of the compiler tool chain(s) involved. If you use qmake, cmake or some hand crafted Makefiles should not matter.

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

          1 Reply Last reply
          0
          • mistralegnaM Offline
            mistralegnaM Offline
            mistralegna
            wrote on last edited by
            #5

            Hi once again !

            I have an ultimate question. As I said it above, I managed to set the Cxx flag when compiling object files. But I don't know how to pass the correct flags when creating the executable.

            Thank you a lot !

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              That should be passed to the linker, using the linker flags. In regular Makefiles it's usually LDFLAGS

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

              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