Building from source problem

Hello, I’m attempting to build from source. Yesterday I downloaded the 90 day trial of visual studio 2013. I cloned the repo and then copied the required dependency files. The first time I ran GenerateProjectFiles.bat it couldn’t find msbuild. I was able to add the correct path to msbuild in my environmental variables and fixed that problem. Then I ran into a problem that cannot find vcvarsx86_amd64.bat. When I browse through the batch files in the other GenerateProjectFiles.bat in BatchFiles dir, the only line I can find that is similar to this uses the variable %VS120COMNTOOLS% that points to the vcvarsx86 batch file. I tried to modify this myself with no luck.

In my environmental variables this is pointed to Program Files(x86) and it is indeed there (I have installed the 64bit version and it appears there is files in both directories; but no VC directory in the Program Files/ dir). The error message states it looking for it in the regular Program Files directory. There is also another message right under Setting up unreal Engine 4 “The system cannot find the path specified” I’m not sure where this error is coming from. Hope that makes sense… Let me know what else I can provide. Here is a screenshot of the CL.

Imgur

So just to confirm, if you access %VS120COMNTOOLS% in explorer, it takes you to: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools?

Yes that’s correct

Okay, that looks like UBT itself is failing to run.

Could you check that you have the following files (relative to the root of the UE4 directory):

  • Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj
  • Engine\Binaries\DotNET\UnrealBuildTool.exe

If you do, I might suggest that you restart your PC (if you haven’t already) to make sure that there’s no processes left using a cached version of the VS120COMNTOOLS environment variable.

I confirmed the files existed. I have restarted a few times in between tries.

I’m not sure what to say then, if the environment variable is pointing to the x86 program files folder then it should work fine (UBT uses the same environment variable to find those batch files).

In your case (64-bit) it will be using:
“%VS120COMNTOOLS%…/…/VC/bin/x86_amd64/vcvarsx86_amd64.bat”

Which should resolve out to:
“C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat”

Where do you end up if you go to the following in explorer?
%VS120COMNTOOLS%…/…/VC/bin/x86_amd64

I moved the VC directory from the (x86) pf to the regular program files directory. And the script ran. It still had the error message “The system cannot find the path specified” but it built the project file… Now when I attempt to compile the engine from that file, I get some more error messages that are related to UnrealBuildTool (I’m not in front of my work station at the moment to give you that exact error) And I’m not sure if it’s related to my problem or not. What do you think? Should I start a new question for that? Is this more of a VS issue or an unreal engine issue? Thanks for your time on this I appreciate it.

Looks like you have installation problems , If the bat file couldnot find your MSBUILD after you install VS , it might indicate that your visual studio installation wasn’t successful.

Also, you mentioned you cloned the source, did you clone from master ? if you did, be aware that code on master might not always compile. try downloading the 4.1 preview release and its required files and try again .

Cheers

Thanks, you’re probably right. Tonight I am going to uninstall 2013 Professional version and try the Express version. I did clone from the 4.0 branch on github. Also, I tried 4.1 preview last night and had the exact same issues. I’ll report back tonight and if that’s the case I’ll make this as the answer! Thanks

sounds like you dont have windows kit ( windows 8 sdk ) installed. as i mentioned on that thread as well.

the project actually references the windows.h file from windows kit ,

you can download it from here

Here’s what I did. I uninstalled both VS Pro and UnrealEngine. I installed VS Express, then I installed Unreal Engine. I still receive the message The system cannot find the path specified however it does build the project file. After trying to run the build I receive a number of errors in which the first one is cannot open include file: 'windows.h'. So after finding another thread with that same issue, I installed Windows SDK. Still no dice, the same errors come up.

In your response on that thread you mention:
Project->References->Linker->General->Additional Library Directories

But I cannot find this exact property in References. I tried adding the directory to just Library Directories but I don’t think that did anything either.

I tried all that. Nothing that I do seems to be working. My windows account name doesn’t have any special characters. It’s very frustrating :frowning:

Those errors look the same as the ones from here: [Almost Solved] Unreal fails to read environment variable and fails to detect Visual Studio - Programming & Scripting - Epic Developer Community Forums

There’s a comment from ryanjon2040 part way down that has some screenshots in it showing the errors. They apparently had to modify the solution properties so it could find the Windows SDK:

That really shouldn’t be required though, and I’m not sure we every really got to the bottom of why it was happening.

What sort of user account do you have in Windows? Is it an administrator account, or does it only have limited access? Could you try running Visual Studio as an adminstrator just to make sure it’s not a permissions issue?

Thanks for that link I hadn’t come across that one. I will try this and report back later. Thank you.