1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 14:02:08 +02:00
tldr/pages.de/common/g++.md
Juri Dispan 9d383ade68
*: fix typos in command names (#11730)
* *: fix typos in command names

* command name fixes in other languages

* fix incorrectly translated commands

* change incorrect file name

* qm move disk alias pages

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-12-14 17:41:19 +05:30

29 lines
1 KiB
Markdown

# g++
> Kompiliere C++ Quelldateien.
> Teil der GCC (GNU Compiler Collection).
> Weitere Informationen: <https://gcc.gnu.org>.
- Kompiliere eine Quelldatei in eine ausführbare Binärdatei:
`g++ {{pfad/zu/quelldatei.cpp}} -o {{pfad/zu/binärdatei}}`
- Zeige geläufige Fehler und Warnungen an:
`g++ {{pfad/zu/quelldatei.cpp}} -Wall -o {{pfad/zu/binärdatei}}`
- Wähle einen Sprachstandard (C++98/C++11/C++14/C++17) für das Kompilieren:
`g++ {{pfad/zu/quelldatei.cpp}} -std={{C++98|C++11|C++14|C++17}} -o {{pfad/zu/binärdatei}}`
- Binde Bibliotheken, die sich an einem anderen Pfad als die Quelldatei befinden, ein:
`g++ {{pfad/zu/quelldatei.cpp}} -o {{pfad/zu/binärdatei}} -I{{pfad/zu/headerdatei}} -L{{pfad/zu/bibliothek}} -l{{bibliotheks_name}}`
- Kompiliere und linke mehrere Quelldateien in eine ausführbare Binärdatei:
`g++ -c {{pfad/zu/quelldatei_1.cpp pfad/zu/quelldatei_2.cpp ...}} && g++ -o {{pfad/zu/binärdatei}} {{pfad/zu/quelldatei_1.o pfad/zu/quelldatei_2.o ...}}`
- Gib die Version von `g++` aus:
`g++ --version`