mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-23 09:42:07 +02:00

* 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>
37 lines
1.2 KiB
Markdown
37 lines
1.2 KiB
Markdown
# gcc
|
|
|
|
> Praproses dan susun kode sumber C dan C++, lalu rakit dan gabungkan bersama-sama.
|
|
> Bagian dari GCC (GNU Compiler Collection).
|
|
> Informasi lebih lanjut: <https://gcc.gnu.org>.
|
|
|
|
- Ubah beberapa sumber kode menjadi program:
|
|
|
|
`gcc {{jalan/menuju/sumber1.c jalan/menuju/sumber2.c ...}} {{-o|--output}} {{jalan/menuju/program}}`
|
|
|
|
- Tampilkan pesan peringatan dan galat dalam [o]utput:
|
|
|
|
`gcc {{jalan/menuju/sumber.c}} -Wall {{-o|--output}} {{jalan/menuju/program}}`
|
|
|
|
- Izinkan peringatan dan simbol debug dalam [o]utput:
|
|
|
|
`gcc {{jalan/menuju/sumber.c}} -Wall {{-g|--debug}} -Og {{-o|--output}} {{jalan/menuju/program}}`
|
|
|
|
- Sertakan pustaka (library) dari direktori yang berbeda:
|
|
|
|
`gcc {{jalan/menuju/sumber.c}} {{-o|--output}} {{jalan/menuju/program}} -I{{jalan/menuju/header}} -L{{jalan/menuju/pustaka}} -l{{nama_pustaka}}`
|
|
|
|
- Susun kode sumber ke dalam bahasa tingkat rendah (assembly):
|
|
|
|
`gcc {{-S|--assemble}} {{jalan/menuju/sumber.c}}`
|
|
|
|
- Susun kode sumber tanpa digabungkan:
|
|
|
|
`gcc {{-c|--compile}} {{jalan/menuju/sumber.c}}`
|
|
|
|
- [O]ptimalkan progam yang disusun agar dapat dijalankan lebih cepat:
|
|
|
|
`gcc {{jalan/menuju/sumber.c}} -O{{1|2|3|fast}} {{-o|--output}} {{jalan/menuju/program}}`
|
|
|
|
- Tampilkan versi penyusun:
|
|
|
|
`gcc --version`
|