Search code examples
linuxbashicc

Adding path for icpc in bashrc?


Every time I have to run icpc I have to type icpc -I/usr/include/x86_64-linux-gnu/c++/

How to include this is bashrc file so I have to just type icpc ?


Solution

  • Add the path to the C_INCLUDE variable.

    export C_INCLUDE="$C_INCLUDE:/usr/include/x86_64-linux-gnu/c++/"
    

    The preceding line should go into your .bash_profile file.