- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I use gcc to build some project on centos 6, where 'icc (ICC) 14.0.2 20140120' has been installed.
I add the following script to ~/.bash_profile to set some environment:
export CC=icc
export CXX=icpc
export LD=xild
export CFLAGS="-std=gnu99 -O3 -ip -restrict -xSSE3 -axSSE3,SSSE3,SSE4.1,SSE4.2"
export CXXFLAGS=" -O3 -ip -restrict -xSSE3 -axSSE3,SSSE3,SSE4.1,SSE4.2"
export CPPFLAGS="-I/opt/intel/include"
export LDFLAGS="-L/opt/intel/lib -L/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64"
source /opt/intel/composer_xe_2013_sp1/bin/compilervars.sh intel64
source /opt/intel/ipp/bin/ippvars.sh intel64
But gcc is used to build some project by using ./configure CC=gcc, and then 'make' will report error as shown below:
gcc -DHAVE_CONFIG_H -I. -I../.. -I/opt/intel/include -std=gnu99 -O3 -MT file1.o -MD -MP -MF .deps/file1.Tpo -c -o file1.o file1.c
In file included from file2.h:6,
from file1.c:2:
/opt/intel/include/math.h:29:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"
It seems gcc building system will use Intel's math.h instead of system's math.h. How to build project by using gcc under the environment where icc is installed?
Thanks!
Andrew
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems that your specification of -I/opt/intel/include may take precedence over gcc's own default include path, so you may wish to remove that option. It might depend on linking against icc libraries as well as those which gcc normally uses.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page