Compiling on Windows - no windows.h?


#1

I am having some problems compiling aseprite on Windows. Worked fine on Ubuntu, but Windows, not so much… I am using cmder as a command tool, cmake and Ninja are installed and available in my PATH, and Visual Studio 2015 is my compiler. I had an installation of VS2015 from Unity, so I followed the steps in the Microsoft help page to install the SDK as well (“Visual Studio Extensibility Tools Update 1”). Problem is, compilation still doesn’t work. Configuration is fine, but when I run

ninja aseprite

I get a list of errors:

[1/97] Building C object third_party\curl\lib\CMakeFiles\libcurl.dir\ldap.c.obj
FAILED: third_party/curl/lib/CMakeFiles/libcurl.dir/ldap.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe  /nologo -DALLEGRO4_WITH_EXTRA_CURSORS -DALLEGRO4_WITH_RESIZE_PATCH -DALLEGRO_STATICLINK -DBUILDING_LIBCURL -DCMARK_STATIC_DEFINE -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DUNICODE -DUSE_ALLEG4_BACKEND -DWINVER=0x0A00 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -D_USRDLL -D_WIN32_WINNT=0x0501 -D_WIN32_WINNT=0x0A00 -I..\third_party\zlib -Ithird_party\zlib -I..\third_party\libpng -Ithird_party\libpng -I..\third_party\tinyxml -I..\third_party\pixman\pixman -I. -I..\third_party\freetype2\include -I..\third_party\giflib\lib -I..\third_party\jpeg -I..\third_party\loadpng -Ithird_party\cmark -I..\third_party\curl\include -I..\third_party\simpleini -I..\src\allegro\include -Iinclude -I..\third_party\. -Ithird_party\curl\include\curl -Ithird_party\curl\lib\..\include -I..\third_party\curl\lib\.. -I..\third_party\curl\lib\..\include -Ithird_party\curl\lib\.. -I..\third_party\curl\lib -Ithird_party\curl\lib  /showIncludes /Fothird_party\curl\lib\CMakeFiles\libcurl.dir\ldap.c.obj /Fdthird_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.pdb /FS -c ..\third_party\curl\lib\ldap.c
c:\users\phonystark\documents\aseprite\third_party\curl\lib\setup.h(224): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
[2/97] Building C object third_party\curl\lib\CMakeFiles\libcurl.dir\mprintf.c.obj
FAILED: third_party/curl/lib/CMakeFiles/libcurl.dir/mprintf.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe  /nologo -DALLEGRO4_WITH_EXTRA_CURSORS -DALLEGRO4_WITH_RESIZE_PATCH -DALLEGRO_STATICLINK -DBUILDING_LIBCURL -DCMARK_STATIC_DEFINE -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DUNICODE -DUSE_ALLEG4_BACKEND -DWINVER=0x0A00 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -D_USRDLL -D_WIN32_WINNT=0x0501 -D_WIN32_WINNT=0x0A00 -I..\third_party\zlib -Ithird_party\zlib -I..\third_party\libpng -Ithird_party\libpng -I..\third_party\tinyxml -I..\third_party\pixman\pixman -I. -I..\third_party\freetype2\include -I..\third_party\giflib\lib -I..\third_party\jpeg -I..\third_party\loadpng -Ithird_party\cmark -I..\third_party\curl\include -I..\third_party\simpleini -I..\src\allegro\include -Iinclude -I..\third_party\. -Ithird_party\curl\include\curl -Ithird_party\curl\lib\..\include -I..\third_party\curl\lib\.. -I..\third_party\curl\lib\..\include -Ithird_party\curl\lib\.. -I..\third_party\curl\lib -Ithird_party\curl\lib  /showIncludes /Fothird_party\curl\lib\CMakeFiles\libcurl.dir\mprintf.c.obj /Fdthird_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.pdb /FS -c ..\third_party\curl\lib\mprintf.c
c:\users\phonystark\documents\aseprite\third_party\curl\lib\setup.h(224): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
[3/97] Building C object third_party\curl\lib\CMakeFiles\libcurl.dir\version.c.obj
FAILED: third_party/curl/lib/CMakeFiles/libcurl.dir/version.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe  /nologo -DALLEGRO4_WITH_EXTRA_CURSORS -DALLEGRO4_WITH_RESIZE_PATCH -DALLEGRO_STATICLINK -DBUILDING_LIBCURL -DCMARK_STATIC_DEFINE -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DUNICODE -DUSE_ALLEG4_BACKEND -DWINVER=0x0A00 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -D_USRDLL -D_WIN32_WINNT=0x0501 -D_WIN32_WINNT=0x0A00 -I..\third_party\zlib -Ithird_party\zlib -I..\third_party\libpng -Ithird_party\libpng -I..\third_party\tinyxml -I..\third_party\pixman\pixman -I. -I..\third_party\freetype2\include -I..\third_party\giflib\lib -I..\third_party\jpeg -I..\third_party\loadpng -Ithird_party\cmark -I..\third_party\curl\include -I..\third_party\simpleini -I..\src\allegro\include -Iinclude -I..\third_party\. -Ithird_party\curl\include\curl -Ithird_party\curl\lib\..\include -I..\third_party\curl\lib\.. -I..\third_party\curl\lib\..\include -Ithird_party\curl\lib\.. -I..\third_party\curl\lib -Ithird_party\curl\lib  /showIncludes /Fothird_party\curl\lib\CMakeFiles\libcurl.dir\version.c.obj /Fdthird_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.pdb /FS -c ..\third_party\curl\lib\version.c
c:\users\phonystark\documents\aseprite\third_party\curl\lib\setup.h(224): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
[4/97] Building C object third_party\curl\lib\CMakeFiles\libcurl.dir\speedcheck.c.obj
FAILED: third_party/curl/lib/CMakeFiles/libcurl.dir/speedcheck.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe  /nologo -DALLEGRO4_WITH_EXTRA_CURSORS -DALLEGRO4_WITH_RESIZE_PATCH -DALLEGRO_STATICLINK -DBUILDING_LIBCURL -DCMARK_STATIC_DEFINE -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DUNICODE -DUSE_ALLEG4_BACKEND -DWINVER=0x0A00 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -D_USRDLL -D_WIN32_WINNT=0x0501 -D_WIN32_WINNT=0x0A00 -I..\third_party\zlib -Ithird_party\zlib -I..\third_party\libpng -Ithird_party\libpng -I..\third_party\tinyxml -I..\third_party\pixman\pixman -I. -I..\third_party\freetype2\include -I..\third_party\giflib\lib -I..\third_party\jpeg -I..\third_party\loadpng -Ithird_party\cmark -I..\third_party\curl\include -I..\third_party\simpleini -I..\src\allegro\include -Iinclude -I..\third_party\. -Ithird_party\curl\include\curl -Ithird_party\curl\lib\..\include -I..\third_party\curl\lib\.. -I..\third_party\curl\lib\..\include -Ithird_party\curl\lib\.. -I..\third_party\curl\lib -Ithird_party\curl\lib  /showIncludes /Fothird_party\curl\lib\CMakeFiles\libcurl.dir\speedcheck.c.obj /Fdthird_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.pdb /FS -c ..\third_party\curl\lib\speedcheck.c
c:\users\phonystark\documents\aseprite\third_party\curl\lib\setup.h(224): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
[5/97] Building C object third_party\curl\lib\CMakeFiles\libcurl.dir\escape.c.obj
FAILED: third_party/curl/lib/CMakeFiles/libcurl.dir/escape.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe  /nologo -DALLEGRO4_WITH_EXTRA_CURSORS -DALLEGRO4_WITH_RESIZE_PATCH -DALLEGRO_STATICLINK -DBUILDING_LIBCURL -DCMARK_STATIC_DEFINE -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DUNICODE -DUSE_ALLEG4_BACKEND -DWINVER=0x0A00 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -D_USRDLL -D_WIN32_WINNT=0x0501 -D_WIN32_WINNT=0x0A00 -I..\third_party\zlib -Ithird_party\zlib -I..\third_party\libpng -Ithird_party\libpng -I..\third_party\tinyxml -I..\third_party\pixman\pixman -I. -I..\third_party\freetype2\include -I..\third_party\giflib\lib -I..\third_party\jpeg -I..\third_party\loadpng -Ithird_party\cmark -I..\third_party\curl\include -I..\third_party\simpleini -I..\src\allegro\include -Iinclude -I..\third_party\. -Ithird_party\curl\include\curl -Ithird_party\curl\lib\..\include -I..\third_party\curl\lib\.. -I..\third_party\curl\lib\..\include -Ithird_party\curl\lib\.. -I..\third_party\curl\lib -Ithird_party\curl\lib  /showIncludes /Fothird_party\curl\lib\CMakeFiles\libcurl.dir\escape.c.obj /Fdthird_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.pdb /FS -c ..\third_party\curl\lib\escape.c
c:\users\phonystark\documents\aseprite\third_party\curl\lib\setup.h(224): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
[6/97] Building C object third_party\curl\lib\CMakeFiles\libcurl.dir\telnet.c.obj
FAILED: third_party/curl/lib/CMakeFiles/libcurl.dir/telnet.c.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe  /nologo -DALLEGRO4_WITH_EXTRA_CURSORS -DALLEGRO4_WITH_RESIZE_PATCH -DALLEGRO_STATICLINK -DBUILDING_LIBCURL -DCMARK_STATIC_DEFINE -DHAVE_CONFIG_H -DNDEBUG -DPNG_NO_MMX_CODE -DUNICODE -DUSE_ALLEG4_BACKEND -DWINVER=0x0A00 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_UNICODE -D_USRDLL -D_WIN32_WINNT=0x0501 -D_WIN32_WINNT=0x0A00 -I..\third_party\zlib -Ithird_party\zlib -I..\third_party\libpng -Ithird_party\libpng -I..\third_party\tinyxml -I..\third_party\pixman\pixman -I. -I..\third_party\freetype2\include -I..\third_party\giflib\lib -I..\third_party\jpeg -I..\third_party\loadpng -Ithird_party\cmark -I..\third_party\curl\include -I..\third_party\simpleini -I..\src\allegro\include -Iinclude -I..\third_party\. -Ithird_party\curl\include\curl -Ithird_party\curl\lib\..\include -I..\third_party\curl\lib\.. -I..\third_party\curl\lib\..\include -Ithird_party\curl\lib\.. -I..\third_party\curl\lib -Ithird_party\curl\lib  /showIncludes /Fothird_party\curl\lib\CMakeFiles\libcurl.dir\telnet.c.obj /Fdthird_party\curl\lib\CMakeFiles\libcurl.dir\libcurl.pdb /FS -c ..\third_party\curl\lib\telnet.c
c:\users\phonystark\documents\aseprite\third_party\curl\lib\setup.h(224): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

The one thing in common between all these seems to be the missing windows.h file. That sounds very much like a SDK problem. I ran vcvarsall.bat to make sure that all environment variables are configured but it doesn’t help. I’m basically out of options. Any suggestions?