This can occur usually in two cases, either the Windows toolchain is not correctly installed, or there is a compilation error in the source for the project.
Firstly to install the Windows toolchain, please followed the guide here and installed Visual Studio:
After that, if you right click on your .uproject and then “GenerateProjectFiles” it should create a Visual Studio .sln file. If you open up the .sln in Visual Studio, you should be able to select the [YourProject]Editor target and then build. It may then fail to build the module again, this time you will have an error you can copy and paste the error to AnswerHub. You could possibly grab the error out of the Unreal Build Tool log, however it may be that you need to edit the code anyway, so having the IDE setup anyway, would be the best route.
If you have previously been using a blueprint only project, you would have been able to create projects without having an IDE and toolchain installed. As this is project has source, you will now need to install a C++ compiler.
Assuming you want to use a plugin or a project of c++ from an older version of ue4, say 4.26, to a newer version 4.27.
But you can’t get it working because it is built in 4.26. So We have to rebuild it under 4.27, but normally ue can’t do that.
The source folder is always in the c++ plugin/project, that’s what we need to rebuild.
Create a new C++ project named just like the old one. It has to be C++ project from scratch.
Open the project in newer ue, and then close it.
Remove source folder from the new project
copy the source and content folder from the old plugin/project.
new a c++ class in content window, under the C++ classes tree.
then you should see all the c++ classes of the old project appears
public class ModuleTest : ModuleRules
{
public ModuleTest(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core"
// ... add other public dependencies that you statically link with here ...
}
);
//The path for the source files
PrivateIncludePaths.AddRange(new string[] { "ModuleTest/Private" });
}
}
then add ModuleTest to MyProject.uproject and MyProject.build.cs
through plugins in ue5 UI, I added voice chat, restarted as suggesterd and now I get this: --------------------------- Missing Modules --------------------------- The following modules are missing or built with a different engine version: VoiceChat Engine modules cannot be compiled at runtime. Please build through your IDE. --------------------------- OK
This happened to me because I added c++ classes to my non c++ Project
What solved the problem was:
I deleted the (yourProjectName) folder in the Source folder, this is where the newly created c++ classes were.
I deleted only the folder with the ProjectName not the 2 other .Target and Editor.Target.css files in the Source folder.
After a pop up selected no or cancel instead of yes and that worked.
After that open your uproject file with notepad and delete the Module section until Plugin code starts, save it and open uproject normal but this time click in no when the pop up asks to rebuild.
open your .uproject with notepad and remove the modules section until the
“Plugins”: [ section begins, if you dont know what to remove exactly just open another .uproject with notepad and compare if they are the same, but with the exception that the modules section is removed and .uproject saved after that.
I got this issue after manually moving Content folder files in File Explorer (don’t do that, just use the Migrate function in Unreal). Hopefully this helps someone else who has the same issue.
The project loads and run correctly. But when I add a c++ file (the project was created with C++ support), closing and reopening the engine causes the error reported here (“modules missing or built with a different…”).
Rebuilding the whole project (clean and rebuild) solves the issue but only temporary: if I add another c++ file, the problem arises again.
Removing the module from the Module section in the .uproject files solves (thanks to everybody here for the workaround!), but I fear there’s something more going on here.
I noticed that after a full build, it was added a new compile command in the .vscode/compileCommands_MYPROJECT.json file, dedicated to the new c++ source file. Adding manually the same command for a new source file doesn’t solve anything, unfortunately.
Does anybody know how the whole build process works and what it expects from a correct build of the project module?
At the current state of things, for me adding a c++ source file to the project doesn’t work for Unreal Engine (at least for 5.2) under Linux using VsCode (the Module section workaround requires a manual correction every time I add a source file and moreover, I fear it could have other side effects).
As I feared, this workaround actually doesn’t work for me: if I run UE without my own module, it cannot find my own classes (like the GameMode, for example).
So basically I’m struck every time I add a new c++ class: I need to rebuild the entire project, compiling 2000+ sources, it takes more than one hour to finish, it’s not a good way to work.
I can confirm UE 5.2 on Linux has some severe problems when adding a C++ class to the project.
My setup:
Linux Ubuntu 22.04
Unreal Engine 5.2 (built from source following official tutorial)
VSCode 1.81.1
I set up things following official documentation (toolchain, compiler, etc.). The engine starts and run without a glitch.
Then I do:
create new project (named Test1) with C++ support
open the project with VSCode
start UE with the launch configuration “Launch Test1Editor (Development)”
add a new C++ class (I derived it from GameInstance) using the command from the Tools menu
update VSCode project config using the command from the Tools menu
close the editor
run the editor with the same command as above
I get the error “modules are missing or built with different engine version”
I’m really stuck. At the moment the only solution I have is to rebuild everything with a “make clean” command. After that, it works again, until the next c++ class… (and this is not a solution, since it means rebuilding the whole engine, more than one hour on my machine)
UPDATE
I’ve found a viable workaround.
The problem seems focused on the Binaries/Linux/UnrealEditor.modules file inside the project. When I add a new c++ class, this file gets out of sync with the content of the Binaries/Linux folder, notably the line:
The problem is: there is no libUnrealEditor-MyProject-1234.so, only libUnrealEditor-MyProject.so.
The workaround is to fix the library name inside this config file. Unreal loads correctly after this. HTH.
Is there anybody able to explain what’s going on here?