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:
"Modules": {
"MyProject": "libUnrealEditor-MyProject-1234.so"
}
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?