Hi
While compiling the CppUTest library, I noticed, that the intel compiler does not find the correct "float.h" header for MSVC2015.
This is the error:
D:\Compiler\Intel\compilers_and_libraries_2016.0.110\windows\compiler\include\float.h(37): fatal error C1083: Datei (Include) kann nicht geöffnet werd en: "../../vc/include/float.h": No such file or directory
I had a look at this float.h file from the intel compiler and saw there an assumption, where the intel compiler expects to find the float.h:
/* // Here, the #include <../../vc/include/header.h> is used as the // equivalent of #include_next<header.h> working for MS C compiler // of MSVS 2005, 2008, 2010 with default installation paths. // The equivalent works correctly when Intel compiler header is not // located in ../../vc/include subfolder for any searched include path, // and MS header is. // In case of non standard location of MS headers, say in // C:/PROGRA~1/MSVS/NEW_VC/INCLUDE folder, proper __MS_VC_INSTALL_PATH // macro should be defined in command line -D option // like -D__MS_VC_INSTALL_PATH=C:/PROGRA~1/MSVS/NEW_VC. */ #ifndef __MS_VC_INSTALL_PATH #define __MS_VC_INSTALL_PATH ../../vc #endif #define __TMP_GLUE(a,b) a##b #define __TMP_PASTE2(a,b) __TMP_GLUE(a,b) #define __TMP_ANGLE_BRACKETS(x) <x> #include __TMP_ANGLE_BRACKETS(__TMP_PASTE2(__MS_VC_INSTALL_PATH,/include/float.h))
This assumption was correct for MSVC2013, but MSVC2015 does not have the "float.h" in "<install-dir>/vc/include" anymore.
The MSVC2015 version has the float.h in this path:
c:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\float.h
The path "c:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt" is already an include path for intel compiler, so a workaround is to simply change the intel float.h file to include the float from there:
//#include __TMP_ANGLE_BRACKETS(__TMP_PASTE2(__MS_VC_INSTALL_PATH,/include/float.h)) #include <../ucrt/float.h>
Maybe this hint is helpful for anyone.
Best regards,
André