There should be no problem with 32-bit library upward compatibility 64-bit backward compatibility is basically difficult A few points to note First, the length of the moving pointer must be sizeof, so recompiling is not necessary. Changed Second, it is actually very similar to long in 64, which is equivalent to long long of 32 in 64 bits. If long is assigned to int, it will cross the boundary. Also, do not assign pointers to integers and it will also fail. Third assembly code If you embed assembly it may not be compatible with each other
Let’s put it this way, it’s best if your library can support 64 and 32 compilation
Generally speaking, 32-bit libraries can be used on 64-bits (there are exceptions, such as when storing pointer addresses as numeric types, if you use int type on 64-bits, it will overflow), but 64-bit libraries Library not available on 32-bit
A 32-bit process can only load 32-bit libraries, and a 64-bit process can only load 64-bit libraries. For 32-bit, the length of the pointer is usually 4 bytes, not 4bits. The CPU can write 4 bytes with one instruction; with 64-bit, the CPU can write 8 bytes with one instruction. On Windows with x86 series (including x86_64) CPUs, 32-bit processes can run on 64-bit operating systems, while 64-bit processes can only run on 64-bit operating systems. You are talking about 64-bit qt and 32-bit compiled boost. Does 64-bit refer to qt creator? Are you sure that the qt library you use is 64-bit and boost is compiled with x86? It is impossible to mix
There should be no problem with 32-bit library upward compatibility
64-bit backward compatibility is basically difficult
A few points to note
First, the length of the moving pointer must be sizeof, so recompiling is not necessary. Changed
Second, it is actually very similar to long in 64, which is equivalent to long long of 32 in 64 bits. If long is assigned to int, it will cross the boundary. Also, do not assign pointers to integers and it will also fail.
Third assembly code If you embed assembly it may not be compatible with each other
Let’s put it this way, it’s best if your library can support 64 and 32 compilation
Generally speaking, 32-bit libraries can be used on 64-bits (there are exceptions, such as when storing pointer addresses as numeric types, if you use int type on 64-bits, it will overflow), but 64-bit libraries Library not available on 32-bit
A 32-bit process can only load 32-bit libraries, and a 64-bit process can only load 64-bit libraries. For 32-bit, the length of the pointer is usually 4 bytes, not 4bits. The CPU can write 4 bytes with one instruction; with 64-bit, the CPU can write 8 bytes with one instruction. On Windows with x86 series (including x86_64) CPUs, 32-bit processes can run on 64-bit operating systems, while 64-bit processes can only run on 64-bit operating systems.
You are talking about 64-bit qt and 32-bit compiled boost. Does 64-bit refer to qt creator?
Are you sure that the qt library you use is 64-bit and boost is compiled with x86? It is impossible to mix