CLion 2019.3 w/ UE4 4.23.1

Answered

Mac user here, I cant get CLion to work with UE4 :/ i followed tons of tutorials, i hate xcode but i want CLion to work the way XCode does but with intellisense and hot reload. For example, Visual Studio. My problems are as follows:

I can't figure out add configuration for UE4 so i can compile and hot reload.

CMake is consistently saying no CMake profile.

Please help, i just want to start coding already :/

8 comments
Comment actions Permalink

Hello!

Let me explain you the integration between CLion and Unreal Engine.

There is a plugin integrated in Unreal Engine which is responsible for generating a CLion's project in Unreal Engine. The plugin generates custom targets for building and cleaning your game (add_custom_target()commands in the CMakeLists.txt). So you can call Build for these targets (not for the entire project!) and external Unreal Engine building processes will be launched.

Also the plugin adds one fake target (add_executable(FakeTarget ...) command in the CMakeLists.txt) for CLion needs. It's used in the [ProjectName]Editor configuration and makes all the intellisense possible. You can build it by means of CMake, but it doesn't really make sense.

In other words, the plugin generates CMake for your Unreal Engine project which gives you an opportunity to use CLion's code insight features. But it doesn't give you an opportunity to run/debug your project in CLion.

In order to use code insight features, you need to let CLion finish building symbols and indexing processes. And you need to have the [ProjectName]Editor configuration selected in the run/debug configurations switcher. 

Here is our blog post about CLion and Unreal Engine: https://blog.jetbrains.com/clion/2016/10/clion-and-ue4/.

0
Comment actions Permalink

Anna Falevskaya Hi! Thank you for your response! I actually ended up downloading the CLion EAP. I ended up figuring it out, though, this is still very helpful incase i ever have problems in the future. Much appreciated!

 

-kind regards,

Mat

0
Comment actions Permalink

This is an old post, but CLion 2020.2 (I'm on Mac) isn't working right with Unreal 4.25.3 with code insight. I tried the steps of having the [Project Name]Editor config selected. Code completion doesn't work. There are some times it will, but the vast majority of times it won't. I'm even noticing my own custom C++ classes, it cannot do code completion properly.

2
Comment actions Permalink

> But it doesn't give you an opportunity to run/debug your project in CLion.

It's possible:

https://medium.com/@mccubbin/ue4-unreal-engine-4-clion-setup-for-mac-635d1af78d8

 

0
Comment actions Permalink

>CLion 2020.2 (I'm on Mac) isn't working right with Unreal 4.25.3 with code insight.

Platform  IDE                                UE                 Code completion works?
macOS    CLion 2020.2.4             UE4 4.23.1    Yes
macOS    CLion 2020.2.4             UE4 4.25.4    No
Windows  CLion 2020.2.4             UE4 4.25.4   No
Windows  Rider for UE 2020.2.2   UE4 4.25.4   Yes

 

0
Comment actions Permalink

Rider for UE cannot come too soon to Mac. Xcode is utter junk when it comes to UE4. Code completion and jumping to definitions doesn't work. It creates 6-7GB of indexes and what not with empty project to absolutely NO benefit. Honestly, Visual Studio on Windows is like a glass of ice cold water to somebody coming from hell (Mac). I hope Rider is going be that for Mac.

0
Comment actions Permalink

>CLion 2020.2 (I'm on Mac) isn't working right with Unreal 4.25.3 with code insight.

This patch fixes 4.25: https://gist.github.com/ericwomer/142650e65473087073f30e5fb97fd6e8

More discussion here: https://github.com/EpicGames/UnrealEngine/pull/5006#issuecomment-640016234

0
Comment actions Permalink

>This patch fixes 4.25: https://gist.github.com/ericwomer/142650e65473087073f30e5fb97fd6e8

there are a lot of unknown types, like "int32", "uint32", "FString", and "go to definition" does not work, either.

0

Please sign in to leave a comment.