Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7678 Discussions

does Intel compiler set a preprocessor symbol LINUXI (on linux) to identify itself?

retspeej
Beginner
193 Views
I came across some code like this
#if (LINUXA || LINUXI || LINUXP)
which tested if it was Absoft, Intel or Portland linux compilers (as opposed to something unsupported).
I can't see these symbols defined anywhere in this particular package.
I recall a very old Microsoft compiler that had a predefined preprocessor symbol MSDOS so you could test if the code was being used on the appropriate platform.
Do Intel compilers generate some preprocessor symbol like LINUXI?
0 Kudos
3 Replies
TimP
Black Belt
193 Views
When you run ICL you get the pre-processor symbols for VC plus the __INTEL_COMPILER symbols (same as for the linux version) which you can read about in the ICL documentation.
SergeyKostrov
Valued Contributor II
193 Views
>>...Do Intel compilers generate some preprocessor symbol like LINUXI?..

What that macro I'm not sure. Where did you find it?

Every C/C++ compiler has some set of PredefinedANSI-Compliant macroslike __FILE__, __LINE__, __DATE__, etc., andPredefinedCompiler-Specific macros.All these macros are generated by a compiler.
Om_S_Intel
Employee
193 Views
As Tim said, the__INTEL_COMPILER macro is defined in "Intel C++ compiler and User guide". You may download a copy of it from http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/lin/main_cls_lin.pd....

Reply