windows.h include file not found

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

windows.h include file not found

Postby stevegt » Fri Jan 20, 2017 2:18 am

Hi All,

Does anyone know why this build on windows might be failing? It's not finding windows.h, but I'm not sure which windows.h it's looking for, or how to tell ninja or automate-git.py where to find it. I'm a 20-year Linux person who's completely comfortable with make and autotools, but am not used to either chromium or cef build tools, have avoided windows for over a decade, and have now spent two days gnashing my teeth over trying to build CEF on windows. I've tried both the manual build of dev at MasterBuildQuickStart and the automated build of 2883 in BranchesAndBuilding. Both fail looking for the same file. I've googled around extensively and have found hints about other FOSS packages hitting incompatibilities with recent versions of Visual Studio and/or various windows SDK's, but no solutions that have worked yet.

Windows server 2008R2 SP1
Visual Studio Community 2015 14.0.25431.01 u3
Windows SDK 10.0.14393.795

Code: Select all
c:\code\chromium_git\chromium\src>ninja -C out\Debug_GN_x86 cef
ninja: Entering directory `out\Debug_GN_x86'
[3/26457] CXX obj/base/base_paths/base_paths_win.obj
FAILED: obj/base/base_paths/base_paths_win.obj
ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64_x86/cl.exe" /nologo /showIncludes /FC @obj/base/base_paths
/base_paths_win.obj.rsp /c ../../base/base_paths_win.cc /Foobj/base/base_paths/b
ase_paths_win.obj /Fd"obj/base/base_paths_cc.pdb"
c:\code\chromium_git\chromium\src\base\base_paths_win.cc(5): fatal error C1083:
Cannot open include file: 'windows.h': No such file or directory
[4/26457] CXX obj/base/base_static/pe_image.obj
FAILED: obj/base/base_static/pe_image.obj
ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64_x86/cl.exe" /nologo /showIncludes /FC @obj/base/base_stati
c/pe_image.obj.rsp /c ../../base/win/pe_image.cc /Foobj/base/base_static/pe_imag
e.obj /Fd"obj/base/base_static_cc.pdb"
c:\code\chromium_git\chromium\src\base\win\pe_image.h(14): fatal error C1083: Ca
nnot open include file: 'windows.h': No such file or directory
[5/26457] CXX obj/base/base_paths/base_paths.obj
FAILED: obj/base/base_paths/base_paths.obj
ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64_x86/cl.exe" /nologo /showIncludes /FC @obj/base/base_paths
/base_paths.obj.rsp /c ../../base/base_paths.cc /Foobj/base/base_paths/base_path
s.obj /Fd"obj/base/base_paths_cc.pdb"
c:\code\chromium_git\chromium\src\base\time\time.h(79): fatal error C1083: Canno
t open include file: 'windows.h': No such file or directory
stevegt
Newbie
 
Posts: 3
Joined: Fri Jan 20, 2017 1:50 am

Re: windows.h include file not found

Postby stevegt » Fri Jan 20, 2017 11:49 am

Anyone know how to tell ninja to tell the compiler the equivalent of '-I /some/dir'? The ninja docs at https://ninja-build.org/manual.html don't discuss this -- they're more... philosophical. :shock:

I found a likely-looking windows.h in
Code: Select all
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\windows.h
Trying to figure out how to tell ninja how to tell the compiler to include that directory.
Last edited by stevegt on Fri Jan 20, 2017 11:50 am, edited 1 time in total.
stevegt
Newbie
 
Posts: 3
Joined: Fri Jan 20, 2017 1:50 am

Re: windows.h include file not found

Postby magreenblatt » Fri Jan 20, 2017 11:49 am

2883 branch requires the 10586 SDK as mentioned on the BranchesAndBuilding Wiki page. Try installing that SDK version and possibly re-installing Visual Studio. See viewtopic.php?f=10&t=14743&start=10#p33323 for a related issue.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: windows.h include file not found

Postby stevegt » Fri Jan 20, 2017 11:56 am

Hi Marshall!

I'll try uninstalling VS and the 14393 SDK and reinstalling with 10586. This'll take a few hours; I'll let you know how it goes...

Thanks,

Steve
stevegt
Newbie
 
Posts: 3
Joined: Fri Jan 20, 2017 1:50 am

Re: windows.h include file not found

Postby lym » Wed May 10, 2017 8:31 pm

magreenblatt wrote:2883 branch requires the 10586 SDK as mentioned on the BranchesAndBuilding Wiki page. Try installing that SDK version and possibly re-installing Visual Studio. See viewtopic.php?f=10&t=14743&start=10#p33323 for a related issue.

Hi magreenblatt:
Thank you for your suggestion, in this way, I solved the problem of windows.h when compiling the 2785 branch.
But when I compile 2987 or newer branch, I encountered this windows.h problem again.
Does I just need to install windows 10 sdk 14393 and uninstalll 10586? Anything else I need to do?
Any Suggestions?

Thanks a lot !
lym
Newbie
 
Posts: 2
Joined: Mon May 08, 2017 3:35 am

Re: windows.h include file not found

Postby magreenblatt » Wed May 10, 2017 9:49 pm

lym wrote:
magreenblatt wrote:2883 branch requires the 10586 SDK as mentioned on the BranchesAndBuilding Wiki page. Try installing that SDK version and possibly re-installing Visual Studio. See http://magpcss.org/ceforum/viewtopic.ph ... =10#p33323 for a related issue.

Hi magreenblatt:
Thank you for your suggestion, in this way, I solved the problem of windows.h when compiling the 2785 branch.
But when I compile 2987 or newer branch, I encountered this windows.h problem again.
Does I just need to install windows 10 sdk 14393 and uninstalll 10586? Anything else I need to do?
Any Suggestions?

Thanks a lot !

You're correct that 2987 branch requires the 14393 adk. You do not need to uninstall the 10586 sdk.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: windows.h include file not found

Postby Dmitry » Thu May 25, 2017 2:27 pm

Hy everyone!
I had the same problem when compiling the 3029 branch. Soluton was to install SDK 14393 instead of SDK 15063. Before installing 14393 i deinstalled old version and removed folder "Windows Kit". VS2015 re-installing isn't required.
Dmitry
Newbie
 
Posts: 1
Joined: Thu May 25, 2017 5:56 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 16 guests