2022-02-26 19:04:31 +07:00
|
|
|
# g++
|
|
|
|
|
clang, clang++, gcc, g++: standardize English page and Indonesian translation (#13751)
* clang, clang++, gcc, g++: standardize English page and add Indonesian translation
This commit adds the short and long-form parameters, enforce imperative mood, and standardizes the contents between `clang` and `gcc` as well as `clang++` and `g++`.
* clang++: Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* clang++: fix URL
* clang, clang++, gcc, g++: fix translation inconsistencies
* Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* Update pages/common/gcc.md
* Update pages.id/common/clang++.md
* Update pages.id/common/clang++.md
* clang++, g++: fix file extension
---------
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <shem.speck@gmail.com>
2024-09-23 12:52:44 +07:00
|
|
|
> Susun kode sumber C++.
|
2022-02-26 19:04:31 +07:00
|
|
|
> Bagian dari GCC (GNU Compiler Collection).
|
|
|
|
> Informasi lebih lanjut: <https://gcc.gnu.org>.
|
|
|
|
|
clang, clang++, gcc, g++: standardize English page and Indonesian translation (#13751)
* clang, clang++, gcc, g++: standardize English page and add Indonesian translation
This commit adds the short and long-form parameters, enforce imperative mood, and standardizes the contents between `clang` and `gcc` as well as `clang++` and `g++`.
* clang++: Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* clang++: fix URL
* clang, clang++, gcc, g++: fix translation inconsistencies
* Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* Update pages/common/gcc.md
* Update pages.id/common/clang++.md
* Update pages.id/common/clang++.md
* clang++, g++: fix file extension
---------
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <shem.speck@gmail.com>
2024-09-23 12:52:44 +07:00
|
|
|
- Ubah suatu berkas kode sumber menjadi program:
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`g++ {{jalan/menuju/sumber1.c jalan/menuju/sumber2.cpp ...}} {{[-o|--output]}} {{jalan/menuju/program}}`
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2024-11-16 17:39:01 +01:00
|
|
|
- Tampilkan pesan peringatan dan galat dalam output:
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`g++ {{jalan/menuju/sumber.cpp}} -Wall {{[-o|--output]}} {{jalan/menuju/program}}`
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2024-11-16 17:39:01 +01:00
|
|
|
- Izinkan peringatan dan simbol debug dalam output:
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`g++ {{jalan/menuju/sumber.cpp}} -Wall {{-g|--debug}} -Og {{[-o|--output]}} {{jalan/menuju/program}}`
|
2022-02-26 19:04:31 +07:00
|
|
|
|
clang, clang++, gcc, g++: standardize English page and Indonesian translation (#13751)
* clang, clang++, gcc, g++: standardize English page and add Indonesian translation
This commit adds the short and long-form parameters, enforce imperative mood, and standardizes the contents between `clang` and `gcc` as well as `clang++` and `g++`.
* clang++: Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* clang++: fix URL
* clang, clang++, gcc, g++: fix translation inconsistencies
* Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* Update pages/common/gcc.md
* Update pages.id/common/clang++.md
* Update pages.id/common/clang++.md
* clang++, g++: fix file extension
---------
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <shem.speck@gmail.com>
2024-09-23 12:52:44 +07:00
|
|
|
- Pilih standar bahasa untuk dikompilasi (C++98/C++11/C++14/C++17):
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`g++ {{jalan/menuju/sumber.cpp}} -std={{c++98|c++11|c++14|c++17}} {{[-o|--output]}} {{jalan/menuju/program}}`
|
clang, clang++, gcc, g++: standardize English page and Indonesian translation (#13751)
* clang, clang++, gcc, g++: standardize English page and add Indonesian translation
This commit adds the short and long-form parameters, enforce imperative mood, and standardizes the contents between `clang` and `gcc` as well as `clang++` and `g++`.
* clang++: Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* clang++: fix URL
* clang, clang++, gcc, g++: fix translation inconsistencies
* Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* Update pages/common/gcc.md
* Update pages.id/common/clang++.md
* Update pages.id/common/clang++.md
* clang++, g++: fix file extension
---------
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <shem.speck@gmail.com>
2024-09-23 12:52:44 +07:00
|
|
|
|
|
|
|
- Sertakan pustaka (library) dari direktori yang berbeda:
|
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`g++ {{jalan/menuju/sumber.cpp}} {{[-o|--output]}} {{jalan/menuju/program}} -I{{jalan/menuju/header}} -L{{jalan/menuju/pustaka}} -l{{nama_pustaka}}`
|
clang, clang++, gcc, g++: standardize English page and Indonesian translation (#13751)
* clang, clang++, gcc, g++: standardize English page and add Indonesian translation
This commit adds the short and long-form parameters, enforce imperative mood, and standardizes the contents between `clang` and `gcc` as well as `clang++` and `g++`.
* clang++: Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* clang++: fix URL
* clang, clang++, gcc, g++: fix translation inconsistencies
* Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* Update pages/common/gcc.md
* Update pages.id/common/clang++.md
* Update pages.id/common/clang++.md
* clang++, g++: fix file extension
---------
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <shem.speck@gmail.com>
2024-09-23 12:52:44 +07:00
|
|
|
|
|
|
|
- Susun dan gabungkan beberapa berkas kode sumber menjadi suatu berkas program biner:
|
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`g++ {{-c|--compile}} {{jalan/menuju/sumber1.cpp jalan/menuju/sumber2.cpp ...}} && g++ {{[-o|--output]}} {{jalan/menuju/program}} {{jalan/menuju/sumber1.o jalan/menuju/sumber2.o ...}}`
|
clang, clang++, gcc, g++: standardize English page and Indonesian translation (#13751)
* clang, clang++, gcc, g++: standardize English page and add Indonesian translation
This commit adds the short and long-form parameters, enforce imperative mood, and standardizes the contents between `clang` and `gcc` as well as `clang++` and `g++`.
* clang++: Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* clang++: fix URL
* clang, clang++, gcc, g++: fix translation inconsistencies
* Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* Update pages/common/gcc.md
* Update pages.id/common/clang++.md
* Update pages.id/common/clang++.md
* clang++, g++: fix file extension
---------
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <shem.speck@gmail.com>
2024-09-23 12:52:44 +07:00
|
|
|
|
|
|
|
- [O]ptimalkan progam yang disusun agar dapat dijalankan lebih cepat:
|
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`g++ {{jalan/menuju/sumber.cpp}} -O{{1|2|3|fast}} {{[-o|--output]}} {{jalan/menuju/program}}`
|
clang, clang++, gcc, g++: standardize English page and Indonesian translation (#13751)
* clang, clang++, gcc, g++: standardize English page and add Indonesian translation
This commit adds the short and long-form parameters, enforce imperative mood, and standardizes the contents between `clang` and `gcc` as well as `clang++` and `g++`.
* clang++: Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* clang++: fix URL
* clang, clang++, gcc, g++: fix translation inconsistencies
* Apply suggestions from code review
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
* Update pages/common/gcc.md
* Update pages.id/common/clang++.md
* Update pages.id/common/clang++.md
* clang++, g++: fix file extension
---------
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <shem.speck@gmail.com>
2024-09-23 12:52:44 +07:00
|
|
|
|
|
|
|
- Tampilkan versi penyusun:
|
|
|
|
|
|
|
|
`g++ --version`
|