Can't compile

hello

This is the first time I try the unreal engine and visual studio and I started with the video tutorial “introduction to UE4 programming” and fallowed it until I tried to “start new instance” and then I got an error message saying there was a build error

after that I get a message:

"the following modules are missing or built with a diffrent engine version:

UE4Editor-tutorialcode-win64-DebugGame.dll

Would you like to rebuild them now?"

after pressing yes I receive the message:

“tutorialcode could not be compiled. Try rebuilding from the source manually”

How do I solve this problem?

Try to open the Solution file in Visual Studio. It is in your project directory and is called .sln. Double click it and it should open in Visual Studio. Press “F7” to compile and “F5” to run.

Edit: In case there is no .sln file, make sure you actually selected the correct project template (the tutorial was made with an old version of the engine, the dialog looks different now). Try to use this Template:

I tried to do that but I still got the same problem

So it builds find in VS also but then when you launch you get this problem?

I found out that by doing “rebuild” and then “start new instance” I could go into the editor but I still can’t enter the editor directly from the launcher/file explorer and I receive the same error messages when I try to.

Hey Sider87-

Just to help clarify, are you unable to create a new C++ based project or unable to compile code for an already existing project?

Thanks

I now noticed that when I start a new project in C++ I get a message saying

“project conversion failed”

“The project failed to compile with this version of the engine. Would you like to open the project in visual studio?”
(my version is 4.7.2)

The project failed to compile with this version of the engine. Build output is as follows:

Running C:/Program Files/Epic Games/4.7/Engine/Binaries/DotNET/UnrealBuildTool.exe test Development Win64 -project=“D:/unreal projects/test/test.uproject” -rocket -editorrecompile -progress
Parsing headers for testEditor
Reflection code generated for testEditor
Performing 8 actions (4 in parallel)
[2/8] Resource ModuleVersionResource.rc.inl
[3/8] Resource test.rc
PCH.test.test.h.cpp
D:\unreal projects\test\Source\test\Resources\Windows\test.rc(8) : fatal error RC1015: cannot open include file ‘windows.h’.

C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3) : fatal error RC1015: cannot open include file ‘windows.h’.

C:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(5) : fatal error C1083: Cannot open include file: ‘new’: No such file or directory
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: D:\unreal projects\test\Binaries\Win64\UE4Editor-test.dll
Cumulative action seconds (4 processors): 0.00 building projects, 0.32 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
UBT execution time: 7.66 seconds

You can try to do this: I just made the video to show you how to regenerate your project (thanks to a couple people here!).

Unfortunately it didn’t help and I still get the same error messages

Hey Sider87-

We’re currently investigating the issue of users not being able to create code projects (UE-11475). For the time being you may want to use a blueprint project instead or try using another version of the engine if you want/need access to source code.

Cheers

I am getting the same error, I looked everywhere on the internet but can’t find an answer! You would think that a tool that is so important in game development they would be a clear solution to this problem… :frowning:

Hey

Can you provide any details about the exact issue you’re experiencing? This will help identify if what you’re seeing is indeed the same issue or if something else.

I followed along the online documentation and youtube tutorials for the vs and ue4. When i go to start a new instance and build the code i get an error

“The following modules are missing or built with a different engine version: UE4Editor-Code-Win64-DebugGame.dll
Would you like to rebuild them?”

If I click yes, I get an error saying:
“Code could not be compiled. Try rebuilding from source manually”

If I press no, nothing happens and the build stops.

Thank you for any answers, I’ve been trying to do this for a long time (like over 6 months). I’m using the VS Community edition and UE4 4.11.1 and updated to 4.12.5 and still getting this problem

When you mentioned tutorials, are you referring to the “3rd Person Power-Up Game with C++” tutorial? If so, could you specify which video and where in the video your issue arises? Additionally, are you using Visual Studio 2013 or 2015? If you are working with UE 4.11.1 or 4.12.5, VS2015 will be needed instead of 2013. If you open the .sln in Visual Studio are you able to compile the project? If not, please provide the compile errors received.

Like tutorial 1 or 2, “Project Creation”, I start getting this issue at 4:40, when I start a new instance to build the project.
Using Visual Studio 2015. Unistalled both VS 2013 and 2015 and re intstalled 2015
And by errors do you mean this?

Seeing that your error is “OtherCompilationError(5)” the root cause may be found in the output tab next to the error list. You should be able to find the same line of OtherCompilationError(5) there along with a second line (usually the line or two before) that gives a more detailed explanation. If you can post a screenshot of the Output window I can try to help determine what the exact issue is.

I couldn’t find where the otherCompilationError(5) was in the output.

But I tried starting a new project and I don’t get either of the errors in the error list but it still says I’m missing the module, here’s the output of the debug, idk if this helps, the new project will compile in the editor while the original did not

LogInit:Display: Running engine for game: CodingTest
LogPlatformFile: Not using cached wrapper
LogInit:Display: RandInit(-1174718141) SRandInit(-1174718139).
LogTaskGraph: Started task graph with 4 named threads and 7 total threads with 1 sets of task threads.
LogStats: Stats thread started at 0.148237
LogInit:Warning: Incompatible or missing module: UE4Editor-CodingTest-Win64-DebugGame.dll
‘UE4Editor.exe’ (Win32): Loaded ‘C:\Windows\System32\msctf.dll’. Cannot find or open the PDB file.
LogExit: Preparing to exit.
The thread 0x20c has exited with code 0 (0x0).
The thread 0xfb0 has exited with code 0 (0x0).
The thread 0x16f4 has exited with code 0 (0x0).
LogModuleManager: Shutting down and abandoning module TextureCompressor (14)

If creating a new project still gives errors in Visual Studio, can you try creating a non UE4, Hello World project in Visual Studio and let me know if that runs or gives you errors as well?

Does the original UE4 project still give the “otherCompilationError(5)” you mentioned before? If so can you post a screenshot of the Output tab as well?

I created a new UE4 project in 4.12.5 and I didn’t get any errors. I don’t get the “otherComplinationError(5)” in non UE4 projects. Maybe it was the save that got messed up or just something with the version. But created a new project and it seems to work fine.