Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Can you build 64-bit binaries on 32-bit Linux system?

rcarreiro
Beginner
382 Views
This is with respect to version 11.1.073 of the compiler for Linux. The compiler is installed on a 32-bit linux system. Can you cross-compile to 64-bit executables/libraries/shared libraries on such a platform. I understand you can not RUN OR USE those binaries on a 32-bit system. But I would like to know if I can create them there. Or do I have to re-install the compiler on a 64-bit linux system if I want to make 64-bit binaries? Thanks!
0 Kudos
3 Replies
TimP
Honored Contributor III
382 Views

No, it's well outside what is supported. You would first need a full installation of g++ cross compiler (including glibc) for your x86_64 target. As that isn't provided by the supported linux distros to my knowledge, that part of it would be a do-it-yourself project. All the prerequisites are already present in a g++ installation on linux x86_64.

0 Kudos
rcarreiro
Beginner
382 Views
How about the other way? Assuming I install packages like ia32-libs and the like, can you build 32-bit binaries with the Intel compiler on a 64-bit system? (I would like to have a unified build machine rather than having to have separate 32-bit and 64-bit build machines.)
0 Kudos
jimdempseyatthecove
Honored Contributor III
382 Views
Assuming you have the compiler and environment configured correctly you can build and run/debug 32-bit binaries on 64-bit platform.

Jim Dempsey
0 Kudos
Reply