Community
cancel
Showing results for 
Search instead for 
Did you mean: 
TimP
Black Belt
349 Views

CL in ICL VS2017 window doesn't find stdint.h

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.065\windows\c
ompiler\include\stdint.h(39): fatal error C1083: Cannot open include file: '../../vc/include/stdint.h': No such file or directory

This occurs with both XE2017u4 and XE2018 beta.

If the CL build step is run in the VS2017 developer prompt, the resulting .obj has no problem linking in the Intel cmd window for either VS2015 or 2017.

The CL build failure occurs only when VS2017 is set under the ICL cmd window.  ICL doesn't have a problem.

Warnings about redefinition of HUGE_VAL.. occur both in the working and non-working cases.  They show that math.h is being processed successfully although with warnings, along the same include path.  Those redefinitions are present in the ICL math.h.

There may be something wrong with my setup, but I don't see it, other than the strange comment about looking for a posix style include path even though running under DOS style cmd window. That is actually the way the paths are written in the ICL installation of stdint.h.

0 Kudos
8 Replies
JenniferJ
Moderator
349 Views

Hi Tim,

try use /I to include VS's include for using CL so VS's include dir is searched first.

Jennifer

SergeyKostrov
Valued Contributor II
349 Views

>>...C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.0.065\windows\ >>compiler\include\stdint.h(39): fatal error C1083: Cannot open include file: '../../vc/include/stdint.h': No such file or directory It looks strange for me because 1st stdint.h at line 39 refers to 2nd stdint.h. Does the 2nd one really exist?
TimP
Black Belt
349 Views

stdint.h is located in the same relative path in Visual Studio 2010 thru 2015 (with a small difference in guard macros for 2015).  VS2017 has it in an entirely different path, although it is about the same as the 2015 one.  Apparently, the ICL stdint.h still wants to refer to the Visual Studio one but doesn't know the path for VS2017.  The path is so complicated that it doesn't make sense to me to try to make a build script which takes care of the change.  

FWIW \Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include\stdint.h appears to have what is in \VC\include\ in the earlier versions, which makes it looks like the Community may be different from Pro.  Since CL is found (in MSVC\14.10.25017\bin\HostX64\x64\), includes could be found relative to that but even there the relative path is more complicated than before.  I suppose Microsoft didn't give any heads up about the new complication.

The Intel math.h distinguishes Visual Studio 2015 and 2017 from the earlier ones and apparently finds the VS math.h the same way in both, but Microsoft never had math.h in with most include files.

Back when I first worked at Intel, moving large projects incrementally from MSVC to ICL was a frequently advocated tactic, so there must be many projects which mix CL and ICL builds and may break now.

SergeyKostrov
Valued Contributor II
349 Views

>>...Apparently, the ICL stdint.h still wants to refer to the Visual Studio one but doesn't know the path for VS2017... Try to use a Junction.exe utility ( www.sysinternals.com ) to create a fix-path to stdint.h you need ( it should emulate an old path... ). I use that technique for one case to resolve a problem with older versions of MinGW C++ compiler.
SergeyKostrov
Valued Contributor II
349 Views

junction.exe "<...>\VC\include" "<...>\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include"
SergeyKostrov
Valued Contributor II
349 Views

I also use that Junction technique to create ..\Include folder from ..\H used by Watcom C++ compilers.
Royi
Novice
349 Views

We have the same error in our projects with VS 2017 Update 4 and Intel Compiler 2018 Update 1.

Any idea?

Yuan_C_Intel
Employee
349 Views

Hi, Tim

This is a known issue from developers when upgrade to Visual Studio 2017. The solution rely on Microsoft's support that issue was registered with Microsoft:

https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/30930367-add-a-built-...

For users encountered this issue, you are encouraged to vote this idea from above link.

 

Best regards

Yolanda

Reply