Competitive Programming & SDL2 with JetBrains Fleet on Arch Linux

ADITYA SINGHADITYA SINGH
3 min read

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.json configurations

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 gcc
    
  • JetBrains 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 .cpp file
  • Redirects input.in as 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 -I and -L paths based on your SDL2 setup. On Linux, there's no need to link -lmingw32 or -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 20 as input
  • Output 30 to output.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

  1. Install JetBrains Fleet
  2. Select a problem from Codeforces or AtCoder
  3. Add sample input to input.in
  4. Press Ctrl + R to build and run

Resources

Happy coding! If this helped, consider sharing or starring the GitHub repo.

0
Subscribe to my newsletter

Read articles from ADITYA SINGH directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

ADITYA SINGH
ADITYA SINGH

I am an Information Science and Engineering student, passionate about Artificial Intelligence, cybersecurity, software development, and problem-solving. I have a strong foundation in data structures and algorithms and was a Top 10 finalist at the SANDBOX 2025 Cybersecurity Hackathon. I’m proficient in Python, C++, SQL, TensorFlow, and PyTorch, and actively contribute to the AI/ML community. On Kaggle, I’m a Notebooks Expert with a global rank of 2,976 out of 57,797 (highest rank: 2,975). Outside academics, I enjoy chess (1500 on Chess.com, 1800 on Lichess), football, badminton, and solving mathematical puzzles.