Compile with 64 bits if i installed in 32 bits qt
-
wrote on 28 Nov 2016, 01:15 last edited by 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.
-
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.
@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. -
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.
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.
1/3