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

C++ 11.1 not working from command line (Mac OS X)

David_K_
Beginner
647 Views
Hi, I am interested in building C++ applications on Intel Macs using the Intel 11.1 compiler. I am using the latest version of Mac OS (10.5.7) on an Intel Core 2 Duo MacBook Pro with 4GB of memory. Everything seems to work fine except for when I try to compile Intel C++ applications from the command line. Here are the basic symptoms:

icc -m32 ........ works fine
icc -m64 ........ works fine
icpc -m32 ...... icpc: error #10001: could not find directory in which the set of libstdc++ include files resides
icpc -m64 ...... icpc: error #10001: could not find directory in which the set of libstdc++ include files resides
gcc/g++ -m32 ........ works fine
gcc/g++ -m64 ........ works fine
Xcode (3.1.3), i386, gcc/g++/icc/icpc ......... works fine
Xcode (3.1.3), x86_64, gcc/g++/icc/icpc ...... works fine

I installed the Intell Compiler exactly according to the instructions, and have sourced the required iccvars script for command line use (using ia32 or intel64 to specifiy architecture).

I also tried forcing the include path by setting the CPLUS_INCLUDE_PATH to the directories where I was able to find header files for libstdc++ on my system. I used du -a to locate all such directories, but none of them seemed to work.....yet Xcode ssems to be able to find and use them. So, I seem to be missing some other environment variables (?).

I believe this kind of thing should be resolved in the iccvars script. So, is this an installation bug?

Thanks in advance,

DK
0 Kudos
1 Solution
Quoc-An_L_Intel
Moderator
647 Views
Ihave the exact same environment, and it works fine for me. (OSX 10.5.7, Xcode 3.1.3, Intel compiler 11.1.046)

When you install Xcode, did you install "UNIX Development Support"? You need to install this for the command line only environment to work correctly with the Intel Compiler.

The Intel compiler version 11.1 has two environment:

1) Command line only environment installed under /opt/intel/
This environment uses the bin/libs/headers from /usr/

2) Xcode integration environment installed under //opt/intel
This environment uses the bin/libs/headers from //usr/

Your posting notes that icc/icpc works in Xcode but not on the command line. I suspect that the "Unix Development Support" did not get installed.

Check to see if "iostream" and other C++ standard headers are available in /usr/include/c++/4.0.0/

View solution in original post

0 Kudos
1 Reply
Quoc-An_L_Intel
Moderator
648 Views
Ihave the exact same environment, and it works fine for me. (OSX 10.5.7, Xcode 3.1.3, Intel compiler 11.1.046)

When you install Xcode, did you install "UNIX Development Support"? You need to install this for the command line only environment to work correctly with the Intel Compiler.

The Intel compiler version 11.1 has two environment:

1) Command line only environment installed under /opt/intel/
This environment uses the bin/libs/headers from /usr/

2) Xcode integration environment installed under //opt/intel
This environment uses the bin/libs/headers from //usr/

Your posting notes that icc/icpc works in Xcode but not on the command line. I suspect that the "Unix Development Support" did not get installed.

Check to see if "iostream" and other C++ standard headers are available in /usr/include/c++/4.0.0/

0 Kudos
Reply