I had no problem build all the previous version UE4 ( up to 4.2.1 ) using Visual Studio 2012 …
In the past two days, I had downloaded UE4.3 version (released code, req 1&2, optional), and I never able to build the engine with Visual Studio 2012 anymore with this UE4.3 version…
The build actually crashed “Microsoft C/C++ Compiler Driver” and I believe it happened when it comes to
23> PCH.UnrealEd.UnrealEd.h.cpp
23> PCH.Engine.EnginePrivate.h.cpp
Since the crashed of the Compiler Driver, it means the whole build will never completed with the error:
UBT error : Failed to produce item: UE4Editor-UnrealEd.lib
I had tried it with two different machines (with Visual Studio 2012) and the same issue of crashing happened on both machines…
Any advise would be much appreciated…
PS: Just for information, I have no issue of building UE4.3 on Visual Studio 2013 … but I do need the UE4.3 to be build with Visual Studio 2012 because our academic institute does not want to support VS2013…
I tried to reproduce this error with Visual Studio 2012, but was unable to do so. Would you be able to provide the dxdiag information for the computer you are using?
Just to make sure nothing was corrupted during the download process, could you try downloading the files again?
That message actually looks somewhat similar to a message I saw a few months ago on a different computer. I don’t recall the actual error message I received because it did not actually stop the build, and I have never seen it appear on my computer. I noticed that Visual Studio 2012 was still compiling even after the message appeared, so I let it continue. I ended up with several of the error messages displaying on my screen, but the build was completed successfully. When the error message appears for you, does the build fail at that point?
I may need to go back to that other computer and try to build the Engine again and see if the error message appears again to find out if that is the same error you are seeing.
The build will still carry on building because the other 3 cl.exe processes are still working.
If I don’t click on ‘Close the program’ on Error message box, the build will still carry on all the following compilations (such as rc.exe etc) …
Until it completed the compilation, VS2012 will pause and ‘do nothing’ until I click on ‘Close the program’ (because the crashed cl.exe process still there)… Then the library will then build BUT failed building the UE4Editor-UnrealEd.lib
I had tried with two machines, and both had the same issue happened…
Please let me know if you need any other information…
I am going to try to get access to the computer where I saw the errors I described previously and see if I can get them to appear again to confirm whether they are the same errors you are seeing.
When the build actually failed at UE4Editor-UnrealEd.lib, did Visual Studio display an error in the Output?
I recently had this exact issue compiling in VS 2012 and it was also fixed by moving the project to C:\UE4. This isn’t a permanent solution for me however as I’m part of a large team working from source control. Other developers here haven’t experienced this issue so I’m curious as to the source of this fix and how I can get it to work using a different path? I’m using the 4.4 build.
I tried building version 4.4.3 of the Engine using VS2012 and did not have any problems doing so. The location where I built it was D:\Source\VS2012\UnrealEngine-4.4.3-release. What was the location on your computer where you were initially trying to build the Engine?
I found out the compiler driver is crashing by running UnrealBuildTool directly. Either way, the compile process continues but in the end I get this…
UBT ERROR: Failed to produce item:
Other people here have compiled the same build with similar paths so something must be misconfigured on my machine somehow but I don’t know where to look. I’ve already wiped the entire build and restarted the process to no avail.
I did some more testing on this yesterday by building the Engine a few times using VS2012 in locations with file paths that were similar or identical to the one you mentioned. All of those builds completed successfully. Just to make sure I had it set up correctly, was the UE4.sln file located in the Public folder that you named above?
Could you open the Properties window for the UE4 project and check the Configuration Properties. If you could get some screenshots of those settings, I will compare them to what I have and see if there are any differences that might be contributing to this issue.
This is a known compiler problem as has been discussed a lot in the other place, are you sure you tested against 4.3 like the OP ? 4.4 is actually worse, I’m guessing 4.5 / head is a lot better after people have been on the case fixing things.
Config screens are attached. I also tried debugging the compiler driver crash. It is crashing in _putenv_s while trying to set an environment variable which appears to contain all the compiler options (very long string due to all the -I includes with full path info). The crash is due to parameter validation failing as described here - although I wasn’t able to get any error codes or anything else useful.
It looks like a potential fix for this issue has been worked into 4.5. If you get a , merge that commit into your Engine code and try building the Engine again in the original location. Unfortunately, since I was unable to duplicate the issue, I can’t test this myself to see if it helps.
@HexTank
I have tried reproducing this issue with a number of different versions of the Engine. Most recently Psyonix-Dave had indicated having trouble with 4.4, so that is where I have been concentrating.