I’m a newbie in c++, so i get lost with some terminology.
Well, I’m trying to use the CLion IDE to develop with unreal, because I developed with phpstorm and Intelij, and I’m very happy with that IDE.
I read that, since 4.2, unreal includes CMakeLists.txt files, so i searched for them and found some cmake files in the engine source code, but now I don’t know what to do with that files, neither could find that files in my unreal projects.
UE4 doesn’t use CMake, it uses a custom build tool called UnrealBuildTool. So unless CLion supports custom build setups, it won’t support UE4. There’s also community support for QCreator. That might help you get it working with CLion.
I testet Clion on GNU/Linux using the cmake files (just do what djw was suggesting, pass -cmakefile to UBT) and it works. Maybe not fully integrated because it has no Code Accessor nor the IDE menu in the ue4 editor works but you can use it.
Create a C++ project, if you don’t have one already.
Open Terminal and enter:
[FONT=Courier New]mono /Users/Shared/UnrealEngine/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe -cmakefile -game -project <path to your .uproject file>
Open the resulting CMakeLists.txt in CLion.
When you add a new class to your project in the Editor, you’ll have to run the above command again. Alternatively you can add new classes from within CLion, which will add them to the CMakeLists.txt file.
I’m not sure if building and/or debugging works with CLion currently. I usually just compile in the Editor and debug with Xcode. I only need CLion for code assistance.
Thanks for the answer. I tried it with my existing c++ project and I’ve got error:
mono /Users/Shared/UnrealEngine/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe -cmakefile -game -project /Volumes/Data\ Mac/Projects/STProject
UnrealBuildTool Exception: ERROR: A valid game project was not found in the specified location ()
Do you know why it occurs?
If I leave out -game param from command, I’ve got this error:
I’m getting started with Unreal. I’m trying to follow this example: Unreal Engine CPP Quick Start | Unreal Engine 5.0 Documentation in Linux using CLion. It kind of works following the described steps in this thread but it has lots of issues with includes. Most of the stuff it can’t find and ends up in red. Is this expected? Any workaround?
Hi all, I return to try to use CLion with unreal and now I’m using UE 4.10 on windows, sucsefull generate the CMakeList.txt on my project, so what should I do now? I open my project on CLion and I don’t know how I can compile the project, or get the autocomplete working, seems like the project is not set up correctly, but how can I set it correctly?
To clarify what is happening, here is a screenshot of Clion with the CMakeList and their errors (I think is not normal that I got empty header files, source files, include directories etc…)
I am also very interested on a very small step-by-step on how to build->compile->debug the Game project to the engine and the little integrations like creating a class from inside the Editor (all that using CLion)
You see, I am also a java programmer(althought I learned a little of C++ on graduation like 10 years ago and really ppl should check jetbrains IDE because puts the visual studio at the ground…