Simple hello world program(bottom of post) when I try to compile & link using ICC:
hmbp:nnCPPProf hima$ icpc -o test test.cpp
Undefined symbols for architecture x86_64:
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1Emc", referenced from:
_main in icpcIBtuRJ.o
ld: symbol(s) not found for architecture x86_64
but g++ can do it:
hmbp:nnCPPProf hima$ g++ -o test test.cpp
hmbp:nnCPPProf hima$ ./test
hmbp:nnCPPProf hima$ cat test.cpp
using namespace std;
int main(int argc, const char* argv)
I am missing some kind of setup but I ran the setup script suggested by the installer and still no difference.
Viet, here is my xcode version:
hmbp:src hima$ /usr/bin/xcodebuild -version
Build version 11B500
I am still facing this problem.
John: Were you able to figure out what is happening? Did you resolve the issue?
Since we weren't able to test any OS/Xcode versions which released after the compiler released date, you may run into some issues.
Is it possible for you to use over OS/Xcode versions? or wait for the next compiler version.
The problem is that Intel can't keep up with Apple Xcode releases. My security plan requires we use the latest version. I think it may be possible to revert to an older version of Xcode and this might get icpc working again. My likely solution will be to no longer purchase the Intel compiler for my Apple computers as I am getting very little utility out of them due to issues of this type. In case you care, Macports GCC is broken for a similar reason, namely Apple no longer installs headers and libraries in standard places. Fortunately GCC provides a compile line workaround via the --sysroot option, e.g.
g++ --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk hello.cc
that works around this problem
while icc and icpc also have a --sysroot option, it doesn't fix this problem. For g++ the issue was that it couldn't find the header files and using --sysroot allowed these to be located. For icpc the headers seem to be found, but not relevant dynamic or static libraries needed to build C++ code.