6 Toolchains

Toolchains

C

Compilation

Install the GNU/GCC (opens in a new tab) and/or the LLVM/Clang (opens in a new tab) toolchains and use them to compile and debug C programs:

sudo dnf group install "C Development Tools and Libraries"
sudo dnf install clang clang-tools-extra

There are more development tools available for installation and use:

dnf group list hidden | grep Development
dnf group info "C Development Tools and Libraries"

Format

Create a .clang-format YAML (opens in a new tab) file, at the base of the project, to automatically format the source files using ClangFormat (opens in a new tab):

.clang-format
---
BasedOnStyle: LLVM
IndentWidth: 2
ColumnLimit: 80
 
---
Language: Cpp
DerivePointerAlignment: false
PointerAlignment: Right
InsertBraces: true

Java

Compilation

Install OpenJDK (opens in a new tab) v23 and use it to compile and debug Java programs:

sudo dnf install java-latest-openjdk-devel
sudo alternatives --config java
sudo alternatives --config javac
java --version
javac --version

Format

Create a .clang-format YAML (opens in a new tab) file, at the base of the project, to automatically format the source files using ClangFormat (opens in a new tab):

.clang-format
---
BasedOnStyle: LLVM
IndentWidth: 2
ColumnLimit: 80
 
---
Language: Java
SortIncludes: true
InsertBraces: true