>_ linuxcommand.dev
Startseite g++
Programming

g++

GNU C++ Compiler

Ubuntu CentOS Debian SUSE Fedora RHEL Arch Alpine macOS
Verified: 2026-03-04
Syntax
$g++ [options] <input files>
Optionen
-o
-std
-Wall
-O2
Examples
$g++ hello.cpp -o hello
$g++ -std=c++17 program.cpp -o program
$g++ main.cpp lib.cpp -o executable
Typical use cases
?
Standard usage
g++ --help
Note Compiles C++ code with STL support.
Export