Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7782 Discussions

Eclipse C++ Makefile Project icpc Command Not Found


Does anyone know how to get the Eclipse C++ (2019-05 on CentOS 7) console to recognize the icpc command for Makefile Projects? 

I recently downloaded Intel Parallel Studio XE 2019 update 5 from [1] and completed an "offline" installation following section 3.2 of the Intel Parallel Studio XE 2019 Update 4 Installation Guide for Linux OS [2] using a trial license. I then followed the tutorial in [3] to integrate the Intel compiler into Eclipse. I was then able to create a "Hello World" C++ Project through the Eclipse New Project Wizard and it compiled as expected. Unfortunately, when I changed my compiler from "g++" to "icpc" in an existing makefile project (I typically work with makefile projects), I received the following error in the Eclipse console:

"make: icpc: Command not found".

I also realized I couldn't use make from a bash terminal unless I used the script as explained in [4]. Even after using the script, I was still unable to use Eclipse to build the project; which I think is expected since the script seems to set the environment variable only for the bash terminal it is used in.

Has anyone had success using Makefile Projects in Eclipse with the Intel C++ Compiler or know how to get the icpc command recognized globally on CentOS 7?



0 Kudos
3 Replies

I wonder what Eclipse version you had on your system?


I was able to find that I could have the script called by altering ~/.bashrc or /etc/profiles.d and, following the explanation in [1], I decided to use the latter approach by adding a symbolic link to in /etc/profile.d so that the script would be called at the startup of bash. This approach initially caused an error since the script expects an argument to be passed. As such, I added a line in the script to set the required argument if it was not passed. This solution seems to work as I am able to use makefile projects in Eclipse and from a bash shell without having to set the environment variables. Unfortunately, this solution is less elegant than I would like since I had to alter the script (which means the solution will need to be repeated for updates). Does anyone know if there is a more elegant solution available?