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

C++ include files

vj2012
Beginner
3,987 Views

Hi,

I am trying to compile a C++ code which has the following include files: 

#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>

When I was trying to compile, it was apparently looking for these include files and following was the error I got:

icc: error #10417: Problem setting up the Intel(R) Compiler compilation environment.  Requires 'C++ include files' setting gathered from 'g++'

Following are the details of the compiler I was using:

OS info and version: Red Hat Enterprise Linux 7 64-bit
Compiler version: parallel_studio_xe_2020_update4_professional_edition

Where can I get these include files from, are these compiler specific?

Thank you.

0 Kudos
23 Replies
vj2012
Beginner
311 Views

Hi Gopika,

I believe my issues with compiling my "hello world" program are now resolved. Thank you very much for your help all along.

Following  were the steps that went through in successfully compiling:

1. As the first step I installed my virtual machine (Linux) afresh.

2. Re-installed "parallel_studio_xe_2020_update4_professional_edition"

3. When in the directory of my "hello world" (hw.cpp) executed the following:

       source /opt/intel/bin/compilervars.sh intel64

4. Then executed: icpc hw.cpp

5. This produced the output "a.out"

6. Then executed: ./a.out to view "hello world" on the terminal.

I have one final question or request for your suggestion, if I may ask in this thread. Do you have suggestions for an IDE (for Linux) that I could install for C++? Your answer or suggestion in this regard would be greatly appreciated.

Thanks again.

0 Kudos
vj2012
Beginner
309 Views

Hi Gopika,

One other critical step that I wanted to mention in this thread is that in my RedHat Linux I had to execute the following command:

yum groupinstall development

which helped me install gcc-c++

Also finally, all the necessary C++ include files were located at: /usr/include/c++/4.8.2 (which I didn't have to source to compile my program successfully).

As you had suggested, all I had to execute were the following two steps:

source /opt/intel/bin/compilervars.sh intel64

icpc hw.cpp

 

Thanks again.

 

0 Kudos
Gopika_Intel
Moderator
287 Views

Hi,

Thank you for the confirmation. Glad to know your issue is resolved. And for the IDEs for Linux and supporting C++, recommended ones with intel toolkits are eclipse and vscode. If you need any additional information, please submit a new question as this thread will no longer be monitored as your initial issue is resolved.

Regards

Gopika


0 Kudos
Reply