I’m trying to get IKVM to build (see this question) but now have encountered a problem not having to do with IKVM so I’m opening up a new question:
When running nant on the IKVM directory with the Visual Studio 2008 Command Prompt (from the Start Menu), I get the following error:
ikvm-native-win32: [cl] Compiling 2 files to C:ikvm-0.36.0.11nativeRelease'. [cl] jni.c [cl] os.c [cl] C:ikvm-0.36.0.11nativeos.c(25) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory [cl] Generating Code... BUILD FAILED C:ikvm-0.36.0.11nativenative.build(17,10): External Program Failed: cl (return code was 2)
I have the Platform SDK installed. What am I missing? I’m sure it’s something simple…
Edit #1 I just checked — I do have the directory containing windows.h on the Path.
Edit #2 Found the answer (see my answer below): The directory containing windows.h needed to be in the «Include» path variable.
asked Sep 17, 2008 at 7:25
1
OK here is the answer I ended up finding: rather than being on the Path, the directory with windows.h (in my case, C:Program FilesMicrosoft SDKsWindowsv6.0AInclude) needed to be set in the Include environment variable.
answered Sep 17, 2008 at 8:48
EpagaEpaga
37.7k58 gold badges156 silver badges245 bronze badges
3
By the way, create environment variable %LIB%, meaning the same — path to all SDKs lib directories
answered Jan 15, 2009 at 13:08
abatishchevabatishchev
97k84 gold badges296 silver badges432 bronze badges
| description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid |
|---|---|---|---|---|---|
|
Learn more about: Fatal Error C1083 |
Fatal Error C1083 |
09/01/2017 |
C1083 |
C1083 |
97e52df3-e79c-4f85-8f1e-bbd1057d55e7 |
Cannot open filetype file: ‘file‘: message
The compiler generates a C1083 error when it can’t find a file it requires. There are many possible causes for this error. An incorrect include search path or missing or misnamed header files are the most common causes, but other file types and issues can also cause C1083. Here are some of the common reasons why the compiler generates this error.
The specified file name is wrong
The name of a file may be mistyped. For example,
#include <algorithm.h>
might not find the file you intend. Most C++ Standard Library header files do not have a .h file name extension. The <algorithm> header would not be found by this #include directive. To fix this issue, verify that the correct file name is entered, as in this example:
#include <algorithm>
Certain C Runtime Library headers are located in a subdirectory of the standard include directory. For example, to include sys/types.h, you must include the sys subdirectory name in the #include directive:
#include <sys/types.h>
The file is not included in the include search path
The compiler cannot find the file by using the search rules that are indicated by an #include or #import directive. For example, when a header file name is enclosed by quotation marks,
#include "myincludefile.h"
this tells the compiler to look for the file in the same directory that contains the source file first, and then look in other locations specified by the build environment. If the quotation marks contain an absolute path, the compiler only looks for the file at that location. If the quotation marks contain a relative path, the compiler looks for the file in the directory relative to the source directory.
If the name is enclosed by angle brackets,
#include <stdio.h>
the compiler follows a search path that is defined by the build environment, the /I compiler option, the /X compiler option, and the INCLUDE environment variable. For more information, including specific details about the search order used to find a file, see #include Directive (C/C++) and #import Directive.
If your include files are in another directory relative to your source directory, and you use a relative path in your include directives, you must use double quotes instead of angle brackets. For example, if your header file myheader.h is in a subdirectory of your project sources named headers, then this example fails to find the file and causes C1083:
#include <headersmyheader.h>
but this example works:
#include "headersmyheader.h"
Relative paths can also be used with directories on the include search path. If you add a directory to the INCLUDE environment variable or to your Include Directories path in Visual Studio, do not also add part of the path to the include directives. For example, if your header is located at pathexampleheadersmyheader.h, and you add pathexampleheaders to your Include Directories path in Visual Studio, but your #include directive refers to the file as
#include <headersmyheader.h>
then the file is not found. Use the correct path relative to the directory specified in the include search path. In this example, you could change the include search path to pathexample, or remove the headers path segment from the #include directive.
Third-party library issues and vcpkg
If you see this error when you are trying to configure a third-party library as part of your build, consider using vcpkg, a C++ package manager, to install and build the library. vcpkg supports a large and growing list of third-party libraries, and sets all the configuration properties and dependencies required for successful builds as part of your project.
The file is in your project, but not the include search path
Even when header files are listed in Solution Explorer as part of a project, the files are only found by the compiler when they are referred to by an #include or #import directive in a source file, and are located in an include search path. Different kinds of builds might use different search paths. The /X compiler option can be used to exclude directories from the include search path. This enables different builds to use different include files that have the same name, but are kept in different directories. This is an alternative to conditional compilation by using preprocessor commands. For more information about the /X compiler option, see /X (Ignore Standard Include Paths).
To fix this issue, correct the path that the compiler uses to search for the included or imported file. A new project uses default include search paths. You may have to modify the include search path to add a directory for your project. If you are compiling on the command line, add the path to the INCLUDE environment variable or the /I compiler option to specify the path to the file.
To set the include directory path in Visual Studio, open the project’s Property Pages dialog box. Select VC++ Directories under Configuration Properties in the left pane, and then edit the Include Directories property. For more information about the per-user and per-project directories searched by the compiler in Visual Studio, see VC++ Directories Property Page. For more information about the /I compiler option, see /I (Additional Include Directories).
The command line INCLUDE or LIB environment is not set
When the compiler is invoked on the command line, environment variables are often used to specify search paths. If the search path described by the INCLUDE or LIB environment variable is not set correctly, a C1083 error can be generated. We strongly recommend using a developer command prompt shortcut to set the basic environment for command line builds. For more information, see Build C/C++ on the Command Line. For more information about how to use environment variables, see How to: Use Environment Variables in a Build.
The file may be locked or in use
If you are using another program to edit or access the file, it may have the file locked. Try closing the file in the other program. Sometimes the other program can be Visual Studio itself, if you are using parallel compilation options. If turning off the parallel build option makes the error go away, then this is the problem. Other parallel build systems can also have this issue. Be careful to set file and project dependencies so build order is correct. In some cases, consider creating an intermediate project to force build dependency order for a common file that may be built by multiple projects. Sometimes antivirus programs temporarily lock recently changed files for scanning. If possible, consider excluding your project build directories from the antivirus scanner.
The wrong version of a file name is included
A C1083 error can also indicate that the wrong version of a file is included. For example, a build could include the wrong version of a file that has an #include directive for a header file that is not intended for that build. For example, certain files may only apply to x86 builds, or to Debug builds. When the header file is not found, the compiler generates a C1083 error. The fix for this problem is to use the correct file, not to add the header file or directory to the build.
The precompiled headers are not yet precompiled
When a project is configured to use precompiled headers, the relevant .pch files have to be created so that files that use the header contents can be compiled. For example, the pch.cpp file (stdafx.cpp in Visual Studio 2017 and earlier) is automatically created in the project directory for new projects. Compile that file first to create the precompiled header files. In the typical build process design, this is done automatically. For more information, see Creating Precompiled Header Files.
Additional causes
-
You have installed an SDK or third-party library, but you have not opened a new developer command prompt window after the SDK or library is installed. If the SDK or library adds files to the INCLUDE path, you may need to open a new developer command prompt window to pick up these environment variable changes.
-
The file uses managed code, but the compiler option
/clris not specified. For more information, see/clr(Common Language Runtime Compilation). -
The file is compiled by using a different
/analyzecompiler option setting than is used to precompile the headers. When the headers for a project are precompiled, all should use the same/analyzesettings. For more information, see/analyze(Code Analysis). -
The file or directory was created by the Windows Subsystem for Linux, per-directory case sensitivity is enabled, and the specified case of a path or file does not match the case of the path or file on disk.
-
The file, the directory, or the disk is read-only.
-
Visual Studio or the command line tools do not have sufficient permissions to read the file or the directory. This can happen, for example, when the project files have different ownership than the process running Visual Studio or the command line tools. Sometimes this issue can be fixed by running Visual Studio or the developer command prompt as Administrator.
-
There are not enough file handles. Close some applications and then recompile. This condition is unusual under typical circumstances. However, it can occur when large projects are built on a computer that has limited physical memory.
Example
The following example generates a C1083 error when the header file "test.h" does not exist in the source directory or on the include search path.
// C1083.cpp // compile with: /c #include "test.h" // C1083 test.h does not exist #include "stdio.h" // OK
For information about how to build C/C++ projects in the IDE or on the command line, and information about setting environment variables, see Projects and build systems.
See also
- MSBuild Properties
- Опубликовано:
- 2016-03-31
После установки обновления Update 2 для популярной бесплатной среды программирования Microsoft Visual Studio 2015 Community последовательно возникли две проблемы при сборке проектов C++ с включённой поддержкой Windows XP («General» → «Platform Toolset» → «Visual Studio 2015 — Windows XP (v140_xp)» в свойствах проекта):
-
IDE не находила заголовочный файл
windows.h(главный WinAPI-заголовок), что приводило к «фатальной ошибке» компилятора:fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory
-
возникала ошибка «Unresolved external» компоновщика при использовании функций типа
GetModuleFileNameExW()из стандартной WinAPI-библиотекиPsapi:error LNK2019: unresolved external symbol _GetModuleFileNameExW@16 referenced in function […]
fatal error LNK1120: 1 unresolved externals
windows.h — фатальная ошибка
Судя по всему, для проектов, ориентированных на сборку с поддержкой Windows XP, в значении по умолчанию параметра «Include Directories» в разделе «VC++ Directories» свойств проекта теперь вместо $(WindowsSDK_IncludePath) фигурирует $(WindowsSdk_71A_IncludePath). Это, вероятно, можно трактовать как шаг Microsoft в направлении полного отказа от поддержки Windows XP как целевой платформы в Visual Studio.
Соответственно, проблему с windows.h можно решить сбросом параметра «Include Directories» на значение по умолчанию («inherit from parent or project defaults») и повторным добавлением прежних дополнительных путей уже к этому новому значению по умолчанию.
Psapi — unresolved external
Что касается Psapi, пришлось добавить ;Psapi.lib в параметр «Additional Dependencies» в разделе «Linker» → «Input» в свойствах проекта; т. е. теперь подключения psapi.h в исходном коде программы недостаточно, и необходимо явным образом подключить ещё и статическую lib-библиотеку. То же, вероятно, касается и некоторых других библиотек.
P. S. Кстати, генерируемые VS 2015 Update 2 исполняемые файлы имеют примерно на 20% больший объём по сравнению с Update 1 при прочих равных.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
#include "stdafx.h" #include "iostream" #pragma comment(lib, "opengl32.lib") #pragma comment(lib, "glu32.lib") #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> HWND hWnd; HDC hDC; HGLRC hRC; // Set up pixel format for graphics initialization void SetupPixelFormat() { PIXELFORMATDESCRIPTOR pfd, *ppfd; int pixelformat; ppfd = &pfd; ppfd->nSize = sizeof(PIXELFORMATDESCRIPTOR); ppfd->nVersion = 1; ppfd->dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; ppfd->dwLayerMask = PFD_MAIN_PLANE; ppfd->iPixelType = PFD_TYPE_COLORINDEX; ppfd->cColorBits = 16; ppfd->cDepthBits = 16; ppfd->cAccumBits = 0; ppfd->cStencilBits = 0; pixelformat = ChoosePixelFormat(hDC, ppfd); SetPixelFormat(hDC, pixelformat, ppfd); } // Initialize OpenGL graphics void InitGraphics() { hDC = GetDC(hWnd); SetupPixelFormat(); hRC = wglCreateContext(hDC); wglMakeCurrent(hDC, hRC); glClearColor(0, 0, 0, 0.5); glClearDepth(1.0); glEnable(GL_DEPTH_TEST); } // Resize graphics to fit window void ResizeGraphics() { // Get new window size RECT rect; int width, height; GLfloat aspect; GetClientRect(hWnd, &rect); width = rect.right; height = rect.bottom; aspect = (GLfloat)width / height; // Adjust graphics to window size glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0, aspect, 1.0, 100.0); glMatrixMode(GL_MODELVIEW); } // Draw frame void DrawGraphics() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Set location in front of camera glLoadIdentity(); glTranslated(0, 0, -10); // Draw a square glBegin(GL_QUADS); glColor3d(1, 0, 0); glVertex3d(-2, 2, 0); glVertex3d(2, 2, 0); glVertex3d(2, -2, 0); glVertex3d(-2, -2, 0); glEnd(); // Show the new scene SwapBuffers(hDC); } // Handle window events and messages LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_SIZE: ResizeGraphics(); break; case WM_CLOSE: DestroyWindow(hWnd); break; case WM_DESTROY: PostQuitMessage(0); break; // Default event handler default: return DefWindowProc (hWnd, uMsg, wParam, lParam); break; } return 1; } int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { const LPCWSTR appname = TEXT("OpenGL Sample"); WNDCLASS wndclass; MSG msg; // Define the window class wndclass.style = 0; wndclass.lpfnWndProc = (WNDPROC)MainWndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = LoadIcon(hInstance, appname); wndclass.hCursor = LoadCursor(NULL,IDC_ARROW); wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wndclass.lpszMenuName = appname; wndclass.lpszClassName = appname; // Register the window class if (!RegisterClass(&wndclass)) return FALSE; // Create the window hWnd = CreateWindow( appname, appname, WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, NULL, NULL, hInstance, NULL); if (!hWnd) return FALSE; // Initialize OpenGL InitGraphics(); // Display the window ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); // Event loop while (1) { if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) == TRUE) { if (!GetMessage(&msg, NULL, 0, 0)) return TRUE; TranslateMessage(&msg); DispatchMessage(&msg); } DrawGraphics(); } wglDeleteContext(hRC); ReleaseDC(hWnd, hDC); } |
Содержание
- fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory
- windows.h no such file or directory (compile c code on linux) [closed]
- 1 Answer 1
- «Cannot open include file: ‘config-win.h’: No such file or directory» while installing mysql-python
- 22 Answers 22
- Thread: windows.h no such file or directory
- windows.h no such file or directory
fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory
Помощь в написании контрольных, курсовых и дипломных работ здесь.
Ошибка fatal error C1083: Cannot open include file: ***: No such file or directory
Помогите пожалуйста исправить ошибку. При компиляции возникает вот такая беда. подробности в.

Ругается и все, Подскажите,что делать? Ошибка 1 fatal error C1083: Не удается открыть файл.
наскоко мне память не изменяет Visul C++ 2005 Express Editional это не полная версия просто в ней отсутствует инклуд windows.h
Добавлено через 2 минуты
для полной разработки приложений тебе надо Visul C++ 2005 Profissional Editional
Fatal error C1083: Не удается открыть файл include: afxwin.h: No such file or directory
Помогите установить VC++ 2008. Что делать при этой ошибке: Ошибка 1 fatal error C1083: Не удается.

Здравствуйте, помогите пожалуйста во многих лабораторных работах выдаёт ошибку «fatal error C1083.
Источник
windows.h no such file or directory (compile c code on linux) [closed]
Want to improve this question? Update the question so it’s on-topic for Stack Overflow.
main.c:2:10: fatal error windows.h: No such file or directory compilation terminated
Do you have any idea why this error happens and how to fix?
1 Answer 1
The problem is that your code is using the windows.h header file to get function declarations for Windows-only functions. This file does not normally exist on Linux, because its installations of toolchains (such as GCC) will (by default) only include the files needed to compile for Linux.
You have a few options:
As Ed Heal suggested, port the code to Linux. That means you would remove the inclusion of windows.h, and replace all the function calls that used the Windows API with their Linux equivalents. This will make your source code only work on Linux, unless you can refactor the OS-dependent calls into platform-agnostic code. A word of warning: unless the program you’re working with is trivial, this is not an easy task. There’s no guarantee that every Windows API function has a Linux equivalent.
Install a Windows toolchain for your build system, which should include windows.h, and cross-compile your code. This will result in a binary that won’t work on Linux, but will work on Windows.
A middle ground between those two options would be to actually do both, and use conditional compilation to allow you to selectively compile for one target or another.
Источник
«Cannot open include file: ‘config-win.h’: No such file or directory» while installing mysql-python
I’m trying to install mysql-python in a virtualenv using pip on windows. At first, I was getting the same error reported here, but the answer there worked for me too. Now I’m getting this following error:
If I symlink (Win7) to my regular (not the virtualenv’s) python’s site-packages/MySQLdb dir I get
I’m rather at a loss here. Any pointers?
22 Answers 22
All I had to do was go over to oracle, and download the MySQL Connector C 6.0.2 (newer doesn’t work!) and do the typical install.
Be sure to include all optional extras (Extra Binaries) via the custom install, without these it did not work for the win64.msi
Once that was done, I went into pycharms, and selected the MySQL-python>=1.2.4 package to install, and it worked great. No need to update any configuration or anything like that. This was the simplest version for me to work through.
The accepted solution no longer seems to work for newer versions of mysql-python. The installer no longer provides a site.cfg file to edit.
Update for mysql 5.5 and config-win.h not visible issue
In 5.5 config-win. has actually moved to Connector separate folder in windows. i.e. smth like:
C:Program FilesMySQLConnector C 6.0.2include
To overcome the problem one need not only to download «dev bits» (which actually connects the connector) but also to modify mysqldb install scripts to add the include folder. I’ve done a quick dirty fix as that.
in setup_windows.py locate the line
Ugly but works until mysqldb authors will change the behaviour.
Almost forgot to mention. In the same manner one needs to add similar additional entry for libs:
i.e. your setup_windows.py looks pretty much like:
The accepted answer is out of date. Some of the suggestions were already incorporated in the package, and I was still getting the error about missing config-win.h & mysqlclient.lib.
pip install mysql-python
P.S. Since I don’t use MySQL anymore, my answer may be out of date as well.
I know this post is super old, but it is still coming up as the top hit in google so I will add some more info to this issue.
I was having the same problems as OP but none of the suggested answers seemed to work for me. Mainly because «config-win.h» didn’t exist anywhere in the connector install folder.
I was using the latest Connector C 6.1.6 as that was what was suggested by the MySQL installer.
This however doesn’t seem to be supported by the latest MySQL-python package (1.2.5). When trying to install it I could see that it was explicitly looking for C Connector 6.0.2.
Источник
Thread: windows.h no such file or directory
Thread Tools
Search Thread
Display
windows.h no such file or directory
I am working on getting a new compiler and the one im looking at is MVC(not sure if the ++ are included on the end lol). Anyways, my current compiler is Dev 4.9.2 and it compiles and runs my program just fine. But when I moved the code over to the MVC and tried it, it didnt work. I got the same error multiple times. So then I downloaded Platform SDK and added in the lib,bin and include files I was supposed to. I also changed a line of code that had kerbel.lib or something like that on it(which I was supposed to do). And I still cant get it to work.
here is the error message:
This is how I used it in the actual code:
I tried changing windows.h to windows and that didnt work either. So im nnot really sure wat else to do. If someone could explain to me why it doesnt work and/or how to fix it that would be great.
I didn’t see step 5 the first time through(I was in a hurry and didnt scroll down that far). Anyways, I commented out the for lines that it says t comment out. Then it says:
I did exactly what it said but cant finish it because I cant make a windows app. And I have no idea why I cant.
If you were in a hurry then, double check now if you have the needed paths on the include list.
Well, I’m glad you said that mario. I did add the paths I was supposed to add, but I added all 3 of them into the executables. I fixed that part. But I still got the error when I ran my program, and I still cant make a windows app. I still can only make a console app.
I also just noticed another thing. On the page Ancient Dragon pointed out says to comment out lines 441-444
in C:Program FilesMicrosoft Visual Studio 8VCVCWizardsAppWizGenericApplicationhtml103 3. I went there, opened the file in Notepad(it mentioned opening it in a text editor) and looked for the 4 lines. Well, I only found these 3 lines.
So, should I just replace the 3 lines I have with the 4 lines it says should be commented out. Or could this really screw up the program?
EDIT: Ok cool. I found the 4 lines. I didnt notice them the first few searches. But I just found them and commented them out. Its working a’ok now.
RE-EDIT!: Bah! Ok, I thought it was working but unfortunately it isnt. I can now make windows apps and dll’s. Yet it still says that there is no winows.h. I just dont get it, ive done all the install steps. All the other headers work just fine. I dont know what else to do from here. It works just fine in Dev C++. Is there some stupidly obvious lib im supposed to add or something?
Источник
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Edited by
Bjarke Elias
on January 21, 2018, 5:23pm
I’ve installed Visual Studio 2017 Community Edition, with a lot of modules installed, just to be sure safe. And everything compiled just fine when we build it from visual studio.
#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
call "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryBuildvcvarsall" x64 |
And when I try and run
I get the following error
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 
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Either you’re missing Windows.h in the Visual Studio directory, or you don’t have access to it.
In the console after calling setup.bat, could you type «set» ?
It should print a list of your environment variables. In those there should be one called INCLUDE and it should look something like this:
INCLUDE=C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.11.25503include;C:Program Files (x86)Windows Kits10include10.0.16299.0ucrt;C:Program Files (x86)Windows Kits10include10.0.16299.0shared;C:Program Files (x86)Windows Kits10include10.0.16299.0um;C:Program Files (x86)Windows Kits10include10.0.16299.0winrt; |
If it does, could you look in one of those folder if there is a file called Windows.h (should be in C:Program Files (x86)Windows Kits10include10.0.16299.0um ). If there isn’t you may want to try reinstalling Visual Studio.
If the file is present, you may not have access to it. Close any program that might have a lock on the file. Try running your command prompt with administrator privilege (normally it’s not necessary).
As a test, you might also try to copy the windows.h file in your code directory and change
#include <windows.h> by #include "windows.h" |
But I wouldn’t recommend that as a permanent solution (and since that file include other files it might not work).
Note that at least two peoples had issues recently with that error with files they have access to (here and here) but those file were not Visual Studio files.
Mārtiņš Možeiko
2446 posts
/ 2 projects
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
I suspect OP simply doesn’t have correct Windows SDK installed. There is no need to reinstall whole Visual Studio. Just run installer and check if you have «Windows 10 SDK (10.0.16299.0) for Desktop C++ [x86 and x64]» installed.
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Edited by
Bjarke Elias
on January 21, 2018, 9:07pm
Thanks a bunch!
This is what was in my include when I typed in SET:
INCLUDE=C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827include; |
I then modified it to match the one you provided:
set INCLUDE=C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827include;C:Program Files (x86)Windows Kits10include10.0.16299.0ucrt;C:Program Files (x86)Windows Kits10include10.0.16299.0shared;C:Program Files (x86)Windows Kits10include10.0.16299.0um;C:Program Files (x86)Windows Kits10include10.0.16299.0winrt |
Only changed one version number, to match the one I have installed. Otherwise, all paths are valid, and windows.h do exist in the um folder.
And now when I run cl win32_handmade.cpp I get:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
cl win32_handmade.cpp Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25834 for x64 Copyright (C) Microsoft Corporation. All rights reserved. win32_handmade.cpp Microsoft (R) Incremental Linker Version 14.12.25834.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:win32_handmade.exe win32_handmade.obj LINK : fatal error LNK1104: cannot open file 'uuid.lib' d:CTestcode> |
I’ll continue to investigate and check out the posts you’ve linked. Thanks again for getting me closer.
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Edited by
Bjarke Elias
on January 21, 2018, 9:15pm
mmozeiko
I suspect OP simply doesn’t have correct Windows SDK installed. There is no need to reinstall whole Visual Studio. Just run installer and check if you have «Windows 10 SDK (10.0.16299.0) for Desktop C++ [x86 and x64]» installed.
You are probably right. I’ll try and install that one instead 
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
No luck :/ Same error. It did get another default set INLCUDE — after running the vcvarsall x64 with the new SDK.
Which looks like this:
[Code]»INCLUDE=C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827ATLMFCinclude;C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827include;»[/Code]
But no windows.h is located in any of those folders, and if I manually add the INCLUDE path to where windows.h is located, I get the cannot open file ‘uuid.lib’ again.
Mārtiņš Možeiko
2446 posts
/ 2 projects
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Try installing «Windows 8.1 SDK» and then running
call "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryBuildvcvarsall" x64 8.1 |
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Edited by
Bjarke Elias
on January 21, 2018, 11:01pm
Tried, That gave me:
********************************************************************** ** Visual Studio 2017 Developer Command Prompt v15.5.3 ** Copyright (c) 2017 Microsoft Corporation ********************************************************************** [ERROR:winsdk.bat] Windows SDK 8.1 : 'include' not found The system cannot find the path specified. [ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. *** |
Tried installing everything that sounded slightly relevant, but still get all of the above errors as before. Perhaps format c: would be a good command to run at this point^^
Mārtiņš Možeiko
2446 posts
/ 2 projects
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Did you install everything in default locations? I believe VS doesn’t like when it is installed in custom location.
Do you maybe have bad anti-virus running in background that blocks something?
Can you check registry for folliwing values in HKEY_LOCAL_MACHINESoftwareWow6432NodeMicosoftMicrosoft SDKsWindows:
— does it have v10.0 with InstallationFolder key pointing to «C:Program Files (x86)Windows Kits10» ?
— does it have v8.1 with InstallationFolder key pointing to «C:Program Files (x86)Windows Kits8.1 ?
Do both of these folders contain «includeum» and «libVERSIONumx64» folders?
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Edited by
Bjarke Elias
on January 22, 2018, 6:26pm
mmozeiko
Did you install everything in default locations? I believe VS doesn’t like when it is installed in custom location.
Do you maybe have bad anti-virus running in background that blocks something?Can you check registry for folliwing values in HKEY_LOCAL_MACHINESoftwareWow6432NodeMicosoftMicrosoft SDKsWindows:
— does it have v10.0 with InstallationFolder key pointing to «C:Program Files (x86)Windows Kits10» ?
— does it have v8.1 with InstallationFolder key pointing to «C:Program Files (x86)Windows Kits8.1 ?Do both of these folders contain «includeum» and «libVERSIONumx64» folders?
— I have not installed anything at a custom location, have installed.
— Both keys looks good in regedit
— Tried disabling both windows firewall and virus protection — still same error «: fatal error LNK1104: cannot open file ‘uuid.lib'»
— both «includeum» and «libVERSIONumx64» exists in C:Program Files (x86)Windows KitsVERSION
Do I have a bad vcvarsall.bat maybe?
Don’t know if this might be relevant, but this is what my SET’s looks like after running
call "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryBuildvcvarsall" x64 8.1 |
and
call "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryBuildvcvarsall" x64 |
Where the difference is this: https://jumpshare.com/v/StKVmqITRsFUqsxgRIoh
For :
call "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryBuildvcvarsall" x64 8.1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
ALLUSERSPROFILE= C:ProgramData APPDATA= C:UsersBjarkeAppDataRoaming CommandPromptType= Native CommonProgramFiles= C:Program FilesCommon Files CommonProgramFiles(x86)= C:Program Files (x86)Common Files CommonProgramW6432= C:Program FilesCommon Files COMPUTERNAME= DESKTOP-M7R6QQG ComSpec= C:WINDOWSsystem32cmd.exe DevEnvDir= C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDE DEVPATH= C:ProgramDataRed Gate.NET ReflectorDevPath ExtensionSdkDir= C:Program Files (x86)Microsoft SDKsWindows Kits10ExtensionSDKs FPS_BROWSER_APP_PROFILE_STRING= Internet Explorer FPS_BROWSER_USER_PROFILE_STRING= Default Framework40Version= v4.0 FrameworkDir= C:WindowsMicrosoft.NETFramework64 FrameworkDir64= C:WindowsMicrosoft.NETFramework64 FrameworkVersion= v4.0.30319 FrameworkVersion64= v4.0.30319 FSHARPINSTALLDIR= C:Program Files (x86)Microsoft SDKsF#4.1Frameworkv4.0 GTK_BASEPATH= C:Program Files (x86)GtkSharp2.12 HOMEDRIVE= C: HOMEPATH= UsersBjarke INCLUDE= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827ATLMFCinclude; C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827include; LIB= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827ATLMFClibx64; C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827libx64; LIBPATH= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827ATLMFClibx64; C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827libx64; C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827libx86storereferences; C:WindowsMicrosoft.NETFramework64v4.0.30319; LOCALAPPDATA= C:UsersBjarkeAppDataLocal LOGONSERVER= \DESKTOP-M7R6QQG NUMBER_OF_PROCESSORS= 8 OneDrive= C:UsersBjarkeOneDrive OS= Windows_NT Path= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827binHostX64x64; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCPackages; C:Program Files (x86)Microsoft SDKsTypeScript2.5; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDECommonExtensionsMicrosoftTestWindow; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam Explorer; C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuild15.0binRoslyn; C:Program Files (x86)Microsoft Visual Studio2017CommunityTeam ToolsPerformance Toolsx64; C:Program Files (x86)Microsoft Visual Studio2017CommunityTeam ToolsPerformance Tools; C:Program Files (x86)Microsoft SDKsF#4.1Frameworkv4.0; C:Program Files (x86)Microsoft Visual Studio2017Community\MSBuild15.0bin; C:WindowsMicrosoft.NETFramework64v4.0.30319; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDE; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7Tools; d:CTest; PATHEXT= .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS; .JSE; .WSF; .WSH; .MSC Platform= x64 PROCESSOR_ARCHITECTURE= AMD64 PROCESSOR_IDENTIFIER= Intel64 Family 6 Model 60 Stepping 3, GenuineIntel PROCESSOR_LEVEL= 6 PROCESSOR_REVISION= 3c03 ProgramData= C:ProgramData ProgramFiles= C:Program Files ProgramFiles(x86)= C:Program Files (x86) ProgramW6432= C:Program Files PROMPT= $P$G PSModulePath= C:Program FilesWindowsPowerShellModules; C:WINDOWSsystem32WindowsPowerShellv1.0Modules PUBLIC= C:UsersPublic SESSIONNAME= Console SystemDrive= C: SystemRoot= C:WINDOWS TEMP= C:UsersBjarkeAppDataLocalTemp TMP= C:UsersBjarkeAppDataLocalTemp USERDOMAIN= DESKTOP-M7R6QQG USERDOMAIN_ROAMINGPROFILE= DESKTOP-M7R6QQG USERNAME= Bjarke USERPROFILE= C:UsersBjarke VBOX_MSI_INSTALL_PATH= C:Program FilesOracleVirtualBox VCIDEInstallDir= C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVC VCINSTALLDIR= C:Program Files (x86)Microsoft Visual Studio2017CommunityVC VCToolsInstallDir= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827 VCToolsRedistDir= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCRedistMSVC14.12.25810 VCToolsVersion= 14.12.25827 VisualStudioVersion= 15.0 VS140COMNTOOLS= C:Program Files (x86)Microsoft Visual Studio 14.0Common7Tools VS150COMNTOOLS= C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7Tools VSCMD_ARG_app_plat= Desktop VSCMD_ARG_HOST_ARCH= x64 VSCMD_ARG_TGT_ARCH= x64 VSCMD_ARG_winsdk= 8.1 VSCMD_VER= 15.5.3 VSINSTALLDIR= C:Program Files (x86)Microsoft Visual Studio2017Community VSSDK150INSTALL= C:Program Files (x86)Microsoft Visual Studio2017CommunityVSSDK windir= C:WINDOWS WindowsLibPath= ReferencesCommonConfigurationNeutral WindowsSDKLibVersion= winv6.3 __DOTNET_ADD_64BIT= 1 __DOTNET_PREFERRED_BITNESS= 64 __VSCMD_PREINIT_PATH= d:CTest; |
And for:
call "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryBuildvcvarsall" x64 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
ALLUSERSPROFILE= C:ProgramData APPDATA= C:UsersBjarkeAppDataRoaming CommandPromptType= Native CommonProgramFiles= C:Program FilesCommon Files CommonProgramFiles(x86)= C:Program Files (x86)Common Files CommonProgramW6432= C:Program FilesCommon Files COMPUTERNAME= DESKTOP-M7R6QQG ComSpec= C:WINDOWSsystem32cmd.exe DevEnvDir= C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDE DEVPATH= C:ProgramDataRed Gate.NET ReflectorDevPath ExtensionSdkDir= C:Program Files (x86)Microsoft SDKsWindows Kits10ExtensionSDKs FPS_BROWSER_APP_PROFILE_STRING= Internet Explorer FPS_BROWSER_USER_PROFILE_STRING= Default Framework40Version= v4.0 FrameworkDir= C:WindowsMicrosoft.NETFramework64 FrameworkDir64= C:WindowsMicrosoft.NETFramework64 FrameworkVersion= v4.0.30319 FrameworkVersion64= v4.0.30319 FSHARPINSTALLDIR= C:Program Files (x86)Microsoft SDKsF#4.1Frameworkv4.0 GTK_BASEPATH= C:Program Files (x86)GtkSharp2.12 HOMEDRIVE= C: HOMEPATH= UsersBjarke INCLUDE= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827ATLMFCinclude; C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827include; LIB= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827ATLMFClibx64; C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827libx64; LIBPATH= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827ATLMFClibx64; C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827libx64; C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827libx86storereferences; C:WindowsMicrosoft.NETFramework64v4.0.30319; LOCALAPPDATA= C:UsersBjarkeAppDataLocal LOGONSERVER= \DESKTOP-M7R6QQG NUMBER_OF_PROCESSORS= 8 OneDrive= C:UsersBjarkeOneDrive OS= Windows_NT Path= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827binHostX64x64; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCPackages; C:Program Files (x86)Microsoft SDKsTypeScript2.5; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDECommonExtensionsMicrosoftTestWindow; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam Explorer; C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuild15.0binRoslyn; C:Program Files (x86)Microsoft Visual Studio2017CommunityTeam ToolsPerformance Toolsx64; C:Program Files (x86)Microsoft Visual Studio2017CommunityTeam ToolsPerformance Tools; C:Program Files (x86)Microsoft SDKsF#4.1Frameworkv4.0; C:Program Files (x86)Microsoft Visual Studio2017Community\MSBuild15.0bin; C:WindowsMicrosoft.NETFramework64v4.0.30319; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDE; C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7Tools; d:CTest; PATHEXT= .COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS; .JSE; .WSF; .WSH; .MSC Platform= x64 PROCESSOR_ARCHITECTURE= AMD64 PROCESSOR_IDENTIFIER= Intel64 Family 6 Model 60 Stepping 3, GenuineIntel PROCESSOR_LEVEL= 6 PROCESSOR_REVISION= 3c03 ProgramData= C:ProgramData ProgramFiles= C:Program Files ProgramFiles(x86)= C:Program Files (x86) ProgramW6432= C:Program Files PROMPT= $P$G PSModulePath= C:Program FilesWindowsPowerShellModules; C:WINDOWSsystem32WindowsPowerShellv1.0Modules PUBLIC= C:UsersPublic SESSIONNAME= Console SystemDrive= C: SystemRoot= C:WINDOWS TEMP= C:UsersBjarkeAppDataLocalTemp TMP= C:UsersBjarkeAppDataLocalTemp USERDOMAIN= DESKTOP-M7R6QQG USERDOMAIN_ROAMINGPROFILE= DESKTOP-M7R6QQG USERNAME= Bjarke USERPROFILE= C:UsersBjarke VBOX_MSI_INSTALL_PATH= C:Program FilesOracleVirtualBox VCIDEInstallDir= C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVC VCINSTALLDIR= C:Program Files (x86)Microsoft Visual Studio2017CommunityVC VCToolsInstallDir= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.12.25827 VCToolsRedistDir= C:Program Files (x86)Microsoft Visual Studio2017CommunityVCRedistMSVC14.12.25810 VCToolsVersion= 14.12.25827 VisualStudioVersion= 15.0 VS140COMNTOOLS= C:Program Files (x86)Microsoft Visual Studio 14.0Common7Tools VS150COMNTOOLS= C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7Tools VSCMD_ARG_app_plat= Desktop VSCMD_ARG_HOST_ARCH= x64 VSCMD_ARG_TGT_ARCH= x64 VSCMD_VER= 15.5.3 VSINSTALLDIR= C:Program Files (x86)Microsoft Visual Studio2017Community VSSDK150INSTALL= C:Program Files (x86)Microsoft Visual Studio2017CommunityVSSDK windir= C:WINDOWS WindowsLibPath= ReferencesCommonConfigurationNeutral WindowsSDKLibVersion= winv6.3 WindowsSDKVersion= __DOTNET_ADD_64BIT= 1 __DOTNET_PREFERRED_BITNESS= 64 __VSCMD_PREINIT_PATH= d:CTest; |
Mārtiņš Možeiko
2446 posts
/ 2 projects
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Edited by
Mārtiņš Možeiko
on January 22, 2018, 9:47pm
Your PATH seems to be broken. It normally should contain C:Windows and C:WindowsSystem32 folders as minimum. And bunch more depending on what software you have installed.
Are you overriding it somewhere?
Not sure if this is relevant to your issue… it could be that vsvarsall.bat cannot find some tool because PATH is broken, that’s why it ignores finding & setting up SDK folders.
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Here is how it looks before running vcvarsall:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
C:ProgramData APPDATA=C:UsersBjarkeAppDataRoaming CommonProgramFiles=C:Program FilesCommon Files CommonProgramFiles(x86)=C:Program Files (x86)Common Files CommonProgramW6432=C:Program FilesCommon Files COMPUTERNAME=DESKTOP-M7R6QQG ComSpec=C:WINDOWSsystem32cmd.exe DEVPATH=C:ProgramDataRed Gate.NET ReflectorDevPath FSHARPINSTALLDIR=C:Program Files (x86)Microsoft SDKsF#4.1Frameworkv4.0 GTK_BASEPATH=C:Program Files (x86)GtkSharp2.12 HOMEDRIVE=C: HOMEPATH=UsersBjarke LOCALAPPDATA=C:UsersBjarkeAppDataLocal LOGONSERVER=\DESKTOP-M7R6QQG NUMBER_OF_PROCESSORS=8 OneDrive=C:UsersBjarkeOneDrive OS=Windows_NT Path=C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:ProgramDataOracleJavajavapath;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)SkypePhone;C:Program Files (x86)GtkSharp2.12bin;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:Program Filesdotnet;C:Program FilesTortoiseSVNbin;C:Program FilesGitcmd;C:Program Filesnodejs;C:UsersBjarkeAppDataLocalMicrosoftWindowsApps;;C:UsersBjarkeAppDataLocalProgramsFiddler;C:Program FilesMicrosoft VS Codebin;C:UsersBjarkeAppDataRoamingnpm PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=3c03 ProgramData=C:ProgramData ProgramFiles=C:Program Files ProgramFiles(x86)=C:Program Files (x86) ProgramW6432=C:Program Files PROMPT=$P$G PSModulePath=C:Program FilesWindowsPowerShellModules;C:WINDOWSsystem32WindowsPowerShellv1.0Modules PUBLIC=C:UsersPublic SESSIONNAME=Console SystemDrive=C: SystemRoot=C:WINDOWS TEMP=C:UsersBjarkeAppDataLocalTemp TMP=C:UsersBjarkeAppDataLocalTemp USERDOMAIN=DESKTOP-M7R6QQG USERDOMAIN_ROAMINGPROFILE=DESKTOP-M7R6QQG USERNAME=Bjarke USERPROFILE=C:UsersBjarke VBOX_MSI_INSTALL_PATH=C:Program FilesOracleVirtualBox VS140COMNTOOLS=C:Program Files (x86)Microsoft Visual Studio 14.0Common7Tools windir=C:WINDOWS |
I could try and uninstall everything again, and see if get a visual studio 1015 installer. Maybe that will install and setup things properly.
If that doesn’t work, then I’ll do the right thing and format c: and install Linux Mint^^ Which I’ve been wanting to switch to for a while. Can’t wait to see what sort of problems I’ll have then hehe. I could always follow the series on a VirtualBox on Linux.
Mārtiņš Možeiko
2446 posts
/ 2 projects
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
Edited by
Mārtiņš Možeiko
on January 23, 2018, 11:59pm
How does «d:CTest» get into PATH? Its not there by default. And I don’t think vsvarsall.bat is setting it. I’m guessing that somebody who is putting d:ctest into PATH is dropping all the other values.
Not sure if this is an issue, but you have empty folder in PATH — two semicolons next to each other.
Day 001 — Setting Up the Windows Build — «fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory»
5 years ago
mmozeiko
How does «d:CTest» get into PATH? It’s not there by default. And I don’t think vsvarsall.bat is setting it. I’m guessing that somebody who is putting d:ctest into PATH is dropping all the other values.
Oh god. That was it. I am so embarrasse! In my setup.bat, I was overriding the PATH.
set PATH=d:CTest; call "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCAuxiliaryBuildvcvarsall" x64 cd /d d:CTestcode |
I remember that I, to begin with, was overriding the path after calling vcvarsall, which gave an error when calling cl file.cpp. So I just moved the set path one line up, and though I’ve fixed the problem as it now sort of worked.
And I see now that I just forgot to add the %path% at the end.
Thank you so much for your help! Of course it was simply at the end. I should just have shared my entire setup.bat, to begin with^^ doh.



