I am using UnrealEngine 5.3 on Linux Gentoo and by generating new C++ Project my UE editor doesn’t open. As IDE i use KDevelop (it is available in Source Code Checkbox in UE Editor Settings).
Also in the generated source texts the include directives are incorrect. For example, the #include "CoreMinimal.h" directive refers to a file, that does not exist in the specified place in the generated source tree. How can I customize paths for *.h files in the UE editor ? I can configure them in the IDE, but if I understand correctly, the compilation happens on the UE side.
I would appreciate ideas or links to documentation on how I can properly customize the IDE to compile C++ projects.
I can offer you some help from the Garuda Linux world. I was previously using Unity on Windows.
The crash issue that I have is sporadic: it turns out that the project creation doesn’t always run the GenerateProjectFiles.sh script that creates the *.kde4 project files. For me this script is located in the base UnrealEngine directory “UnrealEngine-release” (I built in my Documents using the zip from github since it wouldn’t let me check it out). I’m guessing that when the editor attempts to startup it fails silently when it doesn’t see the required C++ project files.
I can’t find the original post for this at the moment, but the user said they found it on another page that they could no longer find, and it seems similar to this one:
The commands that worked for me are:
./GenerateProjectFiles path/to/project/ProjectName.uproject -game
cd path/to/project
make ProjectNameEditor
This will create the ProjectName.kde4 file, and the .kde4 hidden directory. I added these to a script called “GenerateC++ProjectFiles.sh” that takes a project name. You should now be able to open the project in UE, and you can open the .kde4 project in KDevelop.
If I had to hazard a guess as to why the script wasn’t run to begin with I suspect it has to do with the fact that I built UE myself. I will probably move UE to the expected location but as I’m just getting back into Linux after a 5 year hiatus I’m not sure if /usr/bin/ is a good place or not (if anyone knows where UE should get dumped that could be helpful to future users).
Now, to get it built and running.
There is an anonymous user on these forums that configured UE4 with KDevelop (~4?). I’ve hooked up UE5 to KDevelop 5.12 based on their guide:
Note: some of the options have moved around in KDevelop 5, Includes/Imports and Defines are now under “Language Support”.
Edit: When I originally wrote this up I thought that the lack of any definitions in the .kde4/Defines.txt file was correct in that there just weren’t any yet. Kdevelop’s intellisense error on my objects made me realize that there was a missing DLLEXPORT definition for PROJECTNAME_API seen in the header. I did a grep in my project directory and found the file “Definitions.ProjectName.h” which includes “SharedDefinitions.Engine.Cpp20.h”. I did some find replaces to get the form TOKEN=Value and used those. (I omitted the #undef section since everything was redefined after the comment.) Most errors are now gone, just an FYI.
The actual Build Configuration I chose (under “Custom Build System”) is the one that matches the UE project name. When you build and run this, it will launch Unreal Engine for your project where you can test out your changes.
I also found this discussion about the build configurations and the build tools that you might find useful:
I haven’t been able to make any of the other configurations work, and now I think they might only be relevant to Unreal Engine itself when you go to build for distribution: