Intel® C++ Compiler for Linux* - Building 32-bit and 64-bit applications on a 64-bit Linux* development system

By default the Intel® C++ Compiler setup program installs the 32-bit compiler on the 32-bit systems and the 64-bit compiler on the 64-bit systems. You can also install the 32-bit compiler on a 64-bit system and use both 32-bit and 64-bit compilers to produce 32-bit and 64-bit applications on a single 64-bit development system. To set up the environment variables to build with either the 32-bit or the 64-bit compilers on your 64-bit machine simply run the iccvars.sh script provided for each compiler as shown below:

// On 64-bit machine
$ uname -a
Linux spd20 2.4.21-37.EL #1 SMP Wed Sep 7 13:32:18 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux
$ which icc
/opt/spdtools/compiler/ia32e/cc-10.1.010/bin/icc
]$ icc -V
Intel® C Compiler for applications running on Intel® 64, Version 10.1 Build 20071116
$
$ icc hello.c

// Run 64-bit binary on the 64-bit machine
$ ./a.out
Hello World

// point to the 32-bit compiler
$ source /opt/spdtools/compiler/ia32/cc-10.1.010/bin/iccvars.sh
$ icc -V
Intel® C Compiler for applications running on IA-32, Version 10.1 Build 20071116 Package ID: l_cc_p_10.1.010
$ icc hello.c

// Run 32-bit binary that was built using "the 32-bit compiler on the 64-bit machine", on the 64-bit machine
$ ./a.out
Hello World

For more complete information about compiler optimizations, see our Optimization Notice.

2 comments

Top
anonymous's picture

ok

anonymous's picture

As is affairs with diagnostics 64-bit errors for Linux? There is analogue Viva64? As it is full Intel C ++ finds 64-bit errors and warning?

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.