[TUTORIAL] Use Code::Blocks with UE4Editor in Linux

Hello all,

I had no luck finding a good tutorial on how to set up Code::Blocks (my preferred IDE) to use with the UE4Editor in Linux. I spent the day working on it and got some pretty good results.

What works:

  • Launching the UE4Editor from Code::Blocks
  • Using C++ breakpoints and the debugger
  • Blueprints

What does not work:

  • Hot Reloading (since I can’t figure out how to compile again while running the debugger from Code::Blocks)
  • Automatically having new class files added to your C::B project when created by the Editor

Here’s the step-by-step process I came up with. For what it’s worth, I’m using Fedora 22 x86_64, Code::Blocks 13.2, and the latest UE4 from Github as of yesterday (commit 327eac9), YMMV:

  • Start UE4Editor as normal on Linux
  • Create a new C++ Project
  • Wait for the project to be created & UE4Editor to close
  • using the CLI ->

cd </your/project/folder>


There is a bug (that I haven’t reported yet) in the project creation cmake process somewhere that creates an invalid path to three of your project’s source files in CMakeLists.txt. Use the following command to correct CMakeLists.txt:

  • using the CLI →

curdir=$(basename `pwd`); sed -i "s,${curdir}/Source/,Source/," CMakeLists.txt


  • (Dont forget the trailing ‘.’ in this command!)
    using the CLI →

cmake -G "CodeBlocks - Unix Makefiles" .

  • Open <project folder>/UE4.cbp in Code::Blocks (the C::B project file will always be called UE4.cpb)
  • Click [FONT=Courier New]Project -> Set programs’ arguments
  • Select [FONT=Courier New]UE4Editor
  • Type into [FONT=Courier New]Program arguments: field [FONT=Courier New]</full/path/to/project>/<projectName>.uproject
  • Click [FONT=Courier New]Ok
  • Click [FONT=Courier New]Project -> Properties…
  • Click [FONT=Courier New]Build targets tab -> Select UE4Editor (on the left list near the bottom)
  • On right pane, change [FONT=Courier New]Type: to [FONT=Courier New]GUI Application
  • Change [FONT=Courier New]Output filename field by finding and selecting [FONT=Courier New]<UnrealEngine/Engine/Binaries/Linux/UE4Editor>
  • Click [FONT=Courier New]Save -> Replace when prompted to replace the file (don’t worry)
  • Change [FONT=Courier New]Execution working dir field by finding and selecting [FONT=Courier New]<UnrealEngine/Engine/Binaries/Linux>
  • Click [FONT=Courier New]Open then [FONT=Courier New]No when prompted to keep as a relative path
  • Click [FONT=Courier New]Ok on Build targets window
  • Click [FONT=Courier New]Project -> Build options…
  • Ensure [FONT=Courier New]UE4 is highlighted on the left column
  • Change [FONT=Courier New]Selected compiler to [FONT=Courier New]LLVM Clang Compiler if not already selected
  • Click [FONT=Courier New]Ok then [FONT=Courier New]Yes when prompted to use the same compiler for all build targets
  • Change the build target to [FONT=Courier New]UE4Editor instead of [FONT=Courier New]all using the dropdown in the main GUI toolbar
  • Press [FONT=Courier New]Debug / Continue button
  • If prompted to rebuild your project library file click [FONT=Courier New]Yes
  • Wait for the UE4Editor to launch then work on your project

I hope this helps someone out there!

hi bro ! i have problem ! when i click Debug / Continue button and then click Run Button give me error about :



faild to to open descriptor file '/home/mehrdad/UnrealEngine/UnrealEngine-release/field/field.uproject'


my Program arguments is :



field </home/mehrdad/Documents/Unreal Projects/>/<MyProject3>.uproject


how can i fix this ?!

OS : arch Linux

I was able to use the autocomplete feature too. As I have not found anywhere on the internet helping to do this, I will leave my tips here.

  1. Right click in the project > Properties
  2. C/C++ Parser Options
  3. Add folders of your UE4
    …/UnrealEngine/Engine/Source/Runtime/
    …/UnrealEngine/Engine/Source/Runtime/Engine/Classes
    …/UnrealEngine/Engine/Source/Runtime/Engine/Public
    ]
  4. Right click in the project > Reparse this Project (or close and reopen)