Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.

Trouble copiling as 64-bit

I am compiling a system using the Intel C++ Compiler version 9.1 on a RedHat Linux ES 4.5 (kernel 2.6.9). When I use g++ to compile, I get nice 64-bit applications. When I use icc, I only get 32-bit applications. Is there a flag, setting, or something I am missing?

A typical compile line from the makefile looks like:
icpc -o -c -D_PMT_ -D_LINUX_ -D_FILE_OFFSET_BITS=64 -cxxlib-gcc -gcc-version=320 -gcc-name=/usr/bin/g++32 -I -fPIC -02 -g

Thanks for the help!
0 Kudos
1 Reply
Black Belt
The choice between 32- and 64-bit icpc is made by the PATH settings, as performed by the iccvars script, assuming that you have installed both compilers. For 9.1, this script was run like:
source /cce/bin/
so the distinction was between /cce/ for 64-bit and /cc/ for 32-bit.
'which icpc' will show you whether you have /cce/ or /cc/ active.
You would require the 64-bit g++ for library compatibility.