I am trying to compile and run a very simple Hello world program using icpc. Nothing fancy, what I do is following,
using namespace std;
cout << " hello " << endl;
I compile the above code using
icpc hello.cpp -o hh
compilation works just fine but when I try to run this I get "segmentation fault" I am not sure what is causing this error. Could anyone please help trouble shoot this.
Please provide the icc and gcc's version ,and which operating system are you using? and what's the output of 'ulimit -s'?
Intel Developer Support
User forums: http://software.intel.com/en-us/forums/
>>> I get "segmentation fault" I am not sure what is causing this error>>>
By inspecting your code I suppose that possible "candidate" for segfault error could be hello string.One of the reason could be unbalanced stack when the push offset hello instruction generates segfault.Without the seeing the disassembly it is just speculation.
i have your simple, sample program compile under openSUSE Factory ( Version 13.2 ) with
the Intel Parallel Studio XE Sp1 for Linux ( 64 Bit )
no problems, the same under openSUSE 12.3 and openSUSE 13.1