C++ errors

I have been trying to follow along with the Twin Stick shooter 5 base character class video. When creating a new c++ class I get this error.

Successfully added class ‘MyCharacter2’, however you must recompile the ‘TwinStickShooter’ module before it will appear in the Content Browser. Failed to generate project files.

Would you like to open the Output Log to see more details?

I also have another error when following along with 3rd Person Power-Up Game with C++ Videos When trying to create a new project with C++.

Running C:/Program Files (x86)/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“C:/Users/Justin Ortiz/Documents/Unreal Projects/MyProject4/MyProject4.uproject” -game -rocket -progress -2015
Visual C++ 2015 toolchain does not appear to be correctly installed. Please verify that “Common Tools for Visual C++ 2015” was selected when installing Visual Studio 2015.
Discovering modules, targets and source code for game…
UnrealBuildTool Exception: ERROR: Windows SDK v8.1 must be installed in order to build this target.

I’m new to Unreal and have no idea how to fix this. Please help!

Do you have Visual Studio 2015 with all the C++ components installed?

What is your platform? Which Visual Studio version do you have installed?

Maybe obvious, but just to check, have you checked to see if the right Windows SDK is installed correctly? (“ERROR: Windows SDK v8.1 must be installed in order to build this target.”)

I have Visual Studio installed. Microsoft Visual Studio Community 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Community

Visual Basic 2015 00322-20000-00000-AA926
Microsoft Visual Basic 2015

Visual C# 2015 00322-20000-00000-AA926
Microsoft Visual C# 2015

Visual C++ 2015 00322-20000-00000-AA926
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package 1.0
Application Insights Tools for Visual Studio

Common Azure Tools 1.5
Provides common services for use by Azure Mobile Services and Micro

I’m not sure about the platform… I’m using a with Unreal 4 if thats what you mean. I’m installing windows SDK right now hopefully that fixes it. Any other suggestion are welcome!

Hey -

This message typically means that the class was created as expected however the hot reload that the editor preforms automatically when a new class is added failed to complete. If you return to Visual Studio you should see the MyCharacter2 class you added. If you choose to build the project it should tell you if there are any errors that prevent it from compiling successfully. Fixing these compile issues will prevent the message from appearing when another new class is created.

Cheers

Thanks for the reply ! I’m really new to Unreal 4. Can you elaborate a little more in laymans terms how to fix the compile issues? I just tried opening My TwinStickShooter Project and its saying, the following modules are missing or built with a different engine version:UE4Editor-TwinStickShooter.dll… And when I try to rebuild its say TwinStickShooter could not be compiled. Try rebuilding from source manually. not sure what happend…

If you open the project in Visual Studio by running the ProjectName.sln in the project folder you can select Build from the toolbar and then Build Solution. If this succeeds then you should be able to open the project without errors. If this fails, the Error List and Output tabs along the bottom should provide information about what is causing it to fail.

Solved this problem… All I needed to do was reinstall visual studio 2015. Everything works now.

You don’t have to reinstall Visual Studio 2015. Another way is to completely uninstall Unreal Engine first (I don’t think you will lose all of your project configuration or data, so don’t worry about it. If you do, just make a backup).

Then, open a new project in Visual Studio; go to File>New>Project. Select “Game” then click the package called Install Unreal Engine. This will automatically install Epic Games Launcher. After the installation is done, fire up the launcher and install Unreal Engine as usual.

After it’s installed, launch the game engine and try to create a new C++ file from the menu. Make sure to install all the necessary prerequisites when the window pop up. It will compile and automatically opens up VS.

What if I have no .sln file in my project folder? All I have is TwinStickShooter.uproject