2022-02-26 19:04:31 +07:00
|
|
|
# gcc
|
|
|
|
|
2023-12-15 08:49:58 +07:00
|
|
|
> Praproses dan susun kode sumber C dan C++, lalu rakit dan gabungkan bersama-sama.
|
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
|
|
|
> Bagian dari GCC (GNU Compiler Collection).
|
2022-02-26 19:04:31 +07:00
|
|
|
> Informasi lebih lanjut: <https://gcc.gnu.org>.
|
|
|
|
|
2023-12-15 08:49:58 +07:00
|
|
|
- Ubah beberapa sumber kode menjadi program:
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`gcc {{jalan/menuju/sumber1.c jalan/menuju/sumber2.c ...}} {{[-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
|
|
|
|
2024-11-16 17:39:01 +01:00
|
|
|
- Tampilkan pesan peringatan dan galat dalam output:
|
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
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`gcc {{jalan/menuju/sumber.c}} -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
|
|
|
`gcc {{jalan/menuju/sumber.c}} -Wall {{[-g|--debug]}} -Og {{[-o|--output]}} {{jalan/menuju/program}}`
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2023-12-15 08:49:58 +07:00
|
|
|
- Sertakan pustaka (library) dari direktori yang berbeda:
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`gcc {{jalan/menuju/sumber.c}} {{[-o|--output]}} {{jalan/menuju/program}} -I{{jalan/menuju/header}} -L{{jalan/menuju/pustaka}} -l{{nama_pustaka}}`
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2023-12-15 08:49:58 +07:00
|
|
|
- Susun kode sumber ke dalam bahasa tingkat rendah (assembly):
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`gcc {{[-S|--assemble]}} {{jalan/menuju/sumber.c}}`
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2023-12-15 08:49:58 +07:00
|
|
|
- Susun kode sumber tanpa digabungkan:
|
2022-02-26 19:04:31 +07:00
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`gcc {{[-c|--compile]}} {{jalan/menuju/sumber.c}}`
|
2023-12-15 08:49:58 +07:00
|
|
|
|
|
|
|
- [O]ptimalkan progam yang disusun agar dapat dijalankan lebih cepat:
|
|
|
|
|
2025-03-14 09:18:08 +02:00
|
|
|
`gcc {{jalan/menuju/sumber.c}} -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:
|
|
|
|
|
|
|
|
`gcc --version`
|