Competitive Programming & SDL2 with JetBrains Fleet on Arch Linux

I am an Information Science student, primarily focused on developing projects. Writing blogs is one of my hobbies, though I do not publish them very frequently.
Why use a heavyweight IDE when JetBrains Fleet delivers everything—fast and clean?
I've recently adopted JetBrains Fleet for C++ development on Arch Linux, and it's quickly become my preferred setup for both competitive programming and SDL2 graphics projects. Fleet runs just as smoothly on Windows, making it a flexible option across platforms.
If you're looking for a sleek, distraction-free environment to write and run C++ code—including graphical applications—Fleet may be exactly what you need.
Overview
This guide covers:
- Setting up Fleet for C++ on Windows/Linux
- Running competitive programming problems with custom input/output
- Compiling and running SDL2-based image applications
- Creating useful
run.jsonconfigurations
Why JetBrains Fleet?
Fleet is a lightweight IDE from JetBrains designed to:
- Launch quickly
- Support multiple languages via Smart Mode
- Allow customizable build commands
- Work seamlessly on Linux, even with graphical libraries like SDL2
Setting Up C++ Development in Fleet
While this guide is based on Arch Linux, the steps apply to most Linux distributions and Windows.
Requirements
A C++ compiler (e.g., GCC or Clang):
sudo pacman -S gccJetBrains Fleet (installable via JetBrains Toolbox)
(Optional) SDL2 libraries if working on graphical projects
Project Structure for Competitive Programming
An example layout:
project/
├── fleet/
│ └── run.json
├── main.cpp
├── input.in
├── output.out
Sample run.json for Competitive Programming
{
"configurations": [
{
"type": "command",
"name": "Build and Run",
"program": "sh",
"args": [
"-c",
"c++ -o $FILE_NAME_NO_EXT$.exe $FILE$ && ./$FILE_NAME_NO_EXT$.exe < input.in > output.out"
]
}
]
}
This configuration:
- Compiles the
.cppfile - Redirects
input.inas input - Saves the result to
output.out
Running Code in Fleet
Use Ctrl + R to build and run without additional setup.
SDL2 Project Setup in Fleet
To build graphical applications with SDL2, use a project layout like:
project/
├── fleet/
│ └── run.json
├── main.cpp
├── src/
│ ├── Include/ (SDL2 headers)
│ └── Lib/ (SDL2 libraries)
Installing SDL2 (on Linux)
sudo pacman -S sdl2 sdl2_image
Sample run.json for SDL2 Projects
{
"configurations": [
{
"type": "command",
"name": "Build",
"program": "c++",
"args": [
"-Isrc/Include",
"-Lsrc/Lib",
"-o",
"$FILE_NAME_NO_EXT$.exe",
"$FILE$",
"-lSDL2",
"-lSDL2_image"
]
},
{
"type": "command",
"name": "Run",
"program": "$FILE_DIR$/$FILE_NAME_NO_EXT$.exe"
}
]
}
Adjust the
-Iand-Lpaths based on your SDL2 setup. On Linux, there's no need to link-lmingw32or-lSDL2main.
Why This Setup Works
- Fast compile-and-run workflow for problem solving
- Minimal UI distractions
- Supports graphics, games, and visualizations
- Fully customizable through
run.json
Example: Competitive Programming Workflow
Example main.cpp:
#include <iostream>
int main() {
int a{}, b{};
std::cin >> a >> b;
std::cout << a + b << std::endl;
return EXIT_SUCCESS;
}
With input.in containing:
10 20
Running the configuration will:
- Compile the program
- Use
10 20as input - Output
30tooutput.out
All within Fleet—no terminal switching required.
Final Thoughts
While JetBrains Fleet may not yet be the most widely used C++ IDE, it offers a compelling balance of speed, modern design, and flexibility. If you value:
- Lightweight, responsive tools
- Clean UI with custom CLI-like workflows
- Cross-platform support for both code and graphical projects
Bonus: Try It Out
- Install JetBrains Fleet
- Select a problem from Codeforces or AtCoder
- Add sample input to
input.in - Press Ctrl + R to build and run
Resources
Happy coding! If this helped, consider sharing or starring the GitHub repo.
