Cannot create new c++ project. Engine 4.26.2

I downloaded Unreal Engine 4.26.2 from github and built from source on Linux machine.

I’m trying to create a new C++ project but the editor fails to open the project files. I’m able to create and run new Blueprint project, so the issue is only with C++ projects.

When I try to open the project files directly it says to to build from IDE first and I did that but i still keep getting same message.

from logs:
ERROR: Building would modify the following engine files:

   /home/srijan/Documents/UnrealEngine/Engine/Binaries/Linux/Android/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Binaries/Linux/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/2D/Paper2D/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/AI/AISupport/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/AI/EnvironmentQueryEditor/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Blendables/LightPropagationVolume/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Cameras/CameraShakePreviewer/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/AnimationSharing/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/CLionSourceCodeAccess/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/CodeLiteSourceCodeAccess/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/GitSourceControl/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/KDevelopSourceCodeAccess/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/NullSourceCodeAccess/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/PerforceSourceControl/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/PlasticSourceControl/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/PluginUtils/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/PropertyAccessNode/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/SubversionSourceControl/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/UObjectPlugin/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Developer/VisualStudioCodeSourceCodeAccess/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/AssetManagerEditor/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/ContentBrowser/ContentBrowserAssetDataSource/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/ContentBrowser/ContentBrowserClassDataSource/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/CryptoKeys/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/CurveEditorTools/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/DataValidation/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/FacialAnimation/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/GameplayTagsEditor/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/GeometryMode/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/MaterialAnalyzer/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/MobileLauncherProfileWizard/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/PluginBrowser/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Editor/SpeedTreeImporter/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Enterprise/DatasmithContent/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Enterprise/VariantManagerContent/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/AlembicImporter/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/AutomationUtils/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/BackChannel/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/ChaosCloth/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/ChaosClothEditor/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/ChaosEditor/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/ChaosNiagara/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/ChaosSolverPlugin/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/CharacterAI/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/GeometryCache/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/GeometryCollectionPlugin/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/GeometryProcessing/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/MotoSynth/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/PlanarCutPlugin/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/PlatformCrypto/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Experimental/SkeletalReduction/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/FX/Niagara/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Lumin/MagicLeapMedia/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Lumin/MagicLeapPassableWorld/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Media/AndroidMedia/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Media/AvfMedia/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Media/ImgMedia/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Media/MediaCompositing/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Media/MediaPlayerEditor/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Media/WebMMedia/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Media/WmfMedia/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/MeshPainting/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Messaging/TcpMessaging/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/Messaging/UdpMessaging/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/MovieScene/ActorSequence/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/MovieScene/LevelSequenceEditor/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/MovieScene/MatineeToLevelSequence/Binaries/Linux/UE4Editor.modules
   /home/srijan/Documents/UnrealEngine/Engine/Plugins/MovieScene/TemplateSequence/Binaries/Linux/UE4Editor.modules

Kinda stuck at the project creation stage. Would appreciate help with this!

I had the same or a similar problem (Linux Debian 11), and found in various places that others encountered it, too. Seems to be the editor/project manager not reading its environment correctly and thus cant find its components.

Couldn’t solve it in reasonable time.

Epic should deliver a simple C++ code editor built into the engine, doesn’t have to be big thing, or at least they could document the setup, what configuration OS-wise has to happen prior to starting a new project or, if that exists in some data vault, link to it on the tutorial pages.

Can you work around this by creating a blueprint project, and then adding a C++ class to it after it’s already up in the editor?

1 Like

If it’s known what environment variables are missing, a workaround may be to preassign those in the shell and export them before invoking the UE editor binary. If they’re exported, they should be inherited by any subprocess tree unless UE’s startup scripts are doing something strange or are deliberately pre-initializing these to unset or empty defaults before trying to determine their values.

I can’t test this myself (yet) because I’m currently running on Windows. I came to this thread as part of my pre-planning research because I’m preparing to migrate to Linux.

This seems like a major breaking issue on release branch. Major as in cannot claim linux support.

Is there a way to create a tracked issue? Issues tab in Github is disabled.

I’m using 4.26.2 on Fedora 34. I had the same problem. Building manually solved my problem:

/Engine/Binaries/ThirdParty/Mono/Linux/bin/mono ./Engine/Binaries/DotNET/UnrealBuildTool.exe Development Linux -Project=/home/user/unreal_projects/MyProject/MyProject.uproject -TargetType=Editor -Progress

Another post on another forum mentioned that the way Unreal is invoking UBT (with options that prevent modifying engine files) prevents the build from occurring. Manually invoke UBT for your C++ project works, and then you should be able to open the project from the Editor.