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. Compile with 64 bits if i installed in 32 bits qt
Forum Updated to NodeBB v4.3 + New Features

Compile with 64 bits if i installed in 32 bits qt

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

    Hi i have the static build of qt in 32 bits. I think with my program's .exe files i will not have problem. But with dll's probably i couldn't use in 64 bits? I was searching and it's possible one 64-bit app to run as a 32-bit and be compatible in both architectures but i'm not sure. My question is basically, what you recommend me to build my libraries if they must to work with 64 bits and 32 bits. And if i can build if i have my build version in 32 bits. I must to install all again and repeat all of new.

    jsulmJ JKSHJ 2 Replies Last reply
    0
    • J Jeronimo

      Hi i have the static build of qt in 32 bits. I think with my program's .exe files i will not have problem. But with dll's probably i couldn't use in 64 bits? I was searching and it's possible one 64-bit app to run as a 32-bit and be compatible in both architectures but i'm not sure. My question is basically, what you recommend me to build my libraries if they must to work with 64 bits and 32 bits. And if i can build if i have my build version in 32 bits. I must to install all again and repeat all of new.

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

      @Jeronimo I assume you're talking about x86 and x86_64?
      No. You can execute a 32bit app on a 64bit machine but not other way around!
      "possible one 64-bit app to run as a 32-bit" - that is not possible! How can a 64bit app run as a 32bit?
      A 64bit app uses 64bit machine code which cannot be magically changed to 32bit machine code.
      64bit system can execute 32bit machine code, as both the CPU and the OS support 64bit and 32bit.
      But a 32bit system cannot execute 64bit machine code even if CPU supports 64bit as the OS does not (the CPU runs in 32bit mode).
      Also you cannot mix 32bit and 64bit libs in same application.
      If you want to build for 64bit then you will need 64bit Qt build.

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

      1 Reply Last reply
      2
      • J Jeronimo

        Hi i have the static build of qt in 32 bits. I think with my program's .exe files i will not have problem. But with dll's probably i couldn't use in 64 bits? I was searching and it's possible one 64-bit app to run as a 32-bit and be compatible in both architectures but i'm not sure. My question is basically, what you recommend me to build my libraries if they must to work with 64 bits and 32 bits. And if i can build if i have my build version in 32 bits. I must to install all again and repeat all of new.

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by JKSH
        #3

        First, know this:

        • A 32-bit .exe can be run in both 32-bit Windows and 64-bit Windows.
        • A 64-bit .exe can only run in 64-bit Windows.

        @Jeronimo said in Compile with 64 bits if i installed in 32 bits qt:

        i have the static build of qt in 32 bits. I think with my program's .exe files i will not have problem. But with dll's probably i couldn't use in 64 bits?

        You cannot mix 32-bit and 64-bit binaries.

        • A 32-bit .exe can only use 32-bit libraries.
        • A 64-bit .exe can only use 64-bit libraries.

        I was searching and it's possible one 64-bit app to run as a 32-bit and be compatible in both architectures

        No.

        My question is basically, what you recommend me to build my libraries if they must to work with 64 bits and 32 bits.

        Build 32-bit .exe files, using 32-bit libraries. Then, you can run them on 32-bit Windows and 64-bit Windows.

        And if i can build if i have my build version in 32 bits. I must to install all again and repeat all of new.

        Sorry, I don't understand this.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        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