x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] C++ code won't build (cannot open include file 'windows.h')

When building a new project, I get a build error on basic include files (windows.h, new).

I am using VS2013, on Windows 8 Pro x64. I can build non-Unreal projects using these headers but no C++ project will build if generated by Unreal Engine. This is an Unreal issue.

The generated project file seems wrong : in the directories menu of the project setup, all directories are empty. I have tried reinstalling Visual Studio, repairing the Unreal installation, restarting, deleting temporay data and application settings, recreating the project.

Product Version: Not Selected
Tags:
more ▼

asked Mar 20 '14 at 12:01 AM in C++ Programming

avatar image

StrangerGwenn
594 53 63 133

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Apr 28 '15 at 07:40 AM by StrangerGwenn for the following reason:

The question is answered, right answer was accepted


7 answers: sort voted first

FIX : don't use 'special' chars in your Windows account name. This will prevent UAT from harvesting the environment variables from the MSVS scripts, thus tricking it into believing that no compiler is available.

more ▼

answered Mar 21 '14 at 01:27 PM

avatar image

StrangerGwenn
594 53 63 133

avatar image sillydan Jan 18 '15 at 01:19 PM

I changed my windows username from Søren Ryge to SorenRyge, but it didnt fix anything for me..

avatar image SRombauts Mar 25 '15 at 10:32 PM

I created a new account "Seb" (previously "Sébastien") and this solved the issue!

@sillydan you cannot only rename your account, you have to get a new User folder without special chars

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Installing the Windows 8.1 SDK does not fix the issue. Here is the project file.

project.zip (2.9 kB)
more ▼

answered Mar 20 '14 at 06:22 AM

avatar image

StrangerGwenn
594 53 63 133

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Update :

  • Reinstalling the engine does not fix the issue

  • Reinstalling 8.1 SDK does not either

  • The same error is yielded on UnrealHeaderTool when building from source

more ▼

answered Mar 20 '14 at 08:30 AM

avatar image

StrangerGwenn
594 53 63 133

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Bumped. Still can't build any Unreal project.

more ▼

answered Mar 20 '14 at 06:29 PM

avatar image

StrangerGwenn
594 53 63 133

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Additional info :

  • In-editor compilation yields the same error messages

  • Blueprint compilation is unnaffected

Operations tried so far :

  • Reinstalled Windows 8.1 SDK

  • Removed previous versions of Visual Studio

  • Reinstalled Visual Studio 2013

  • Reinstalled Visual Studio 2013 redistributables (x86 and x64)

  • Reinstalled Unreal entirely

  • Checked environment variable VS120COMNTOOLS

Working fix for building in Visual Studio is to use the "inherit" settings, but this won't work in editor and has to be done at each code add.

Similar issue : https://forums.unrealengine.com/showthread.php?98-Cannot-open-include-file-windows-h&p=1834#post1834

Is there feedback and support from Epic Games here or is this purely a community wiki ? How can I get effective feedback ? This is a blocking issue that had me working for two days now. I really wish this was fixed.

more ▼

answered Mar 21 '14 at 12:22 PM

avatar image

StrangerGwenn
594 53 63 133

avatar image CoryG Apr 07 '15 at 08:14 PM

The inherit solution worked for me - also had tried all the things you listed off first. My name has no special characters so I don't know what the actual solution here is supposed to be - it seems like Epic forgot to set the include directories when they built the project templates.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I remember encountering this, or something similar, a while back on a test windows 8 machine. I don't recall the specific steps I took to fix the issue, but its worth trying to install the **Windows SDK 8.1** if you don't already have it installed, in the meantime before staff or somebody else can get back to you, and see if that resolves it. It's possibly also worth attaching the malformed project file to your post to assist with troubleshooting.

more ▼

answered Mar 20 '14 at 12:22 AM

avatar image

twiddle
1.5k 55 36 73

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Temporary workaround for the bug :

  • Generate the project

  • In the VS project settings, go to Directories and use the "inherit" setting everywhere

This has to be done very time code is added, so a proper fix is still required.

more ▼

answered Mar 21 '14 at 07:20 AM

avatar image

StrangerGwenn
594 53 63 133

avatar image SalihBalkan Mar 27 '16 at 08:45 PM

I am still getting same error in 2016.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question