1 2 3 4 5 6 | #include <windows.h> int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { return(0); } |
However when compiling through a bat file, using cl fileName.cpp I get the following error:
Here is the relevant part of my setup.bat
1 | call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall" x64 |
And when I try and run
1 | cl win32_handmade.cpp |
I get the following error
1 2 3 4 5 | Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25834 for x64 Copyright (C) Microsoft Corporation. All rights reserved. win32_handmade.cpp win32_handmade.cpp(1): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory |
I've been stuck for hours on this one, could anyone point me in the right direction?
So far so good. Stuck on day one :D Only 500 days left. No, but really, I'm so excited about this series!