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>
This commit is contained in:

committed by
GitHub

parent
4a14879d46
commit
d29375da5c
@@ -1,28 +1,37 @@
|
||||
# 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 {{jalan/menuju/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 -Og -o {{jalan/menuju/program}}`
|
||||
`gcc {{jalan/menuju/sumber.c}} -Wall {{-g|--debug}} -Og {{-o|--output}} {{jalan/menuju/program}}`
|
||||
|
||||
- Sertakan pustaka (library) dari direktori yang berbeda:
|
||||
|
||||
`gcc {{sumber.c}} -o {{jalan/menuju/program}} -I{{jalan/menuju/header}} -L{{jalan/menuju/pustaka}} -l{{nama_pustaka}}`
|
||||
`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 {{jalan/menuju/sumber.c}}`
|
||||
`gcc {{-S|--assemble}} {{jalan/menuju/sumber.c}}`
|
||||
|
||||
- Susun kode sumber tanpa digabungkan:
|
||||
|
||||
`gcc -c {{jalan/menuju/sumber.c}}`
|
||||
`gcc {{-c|--compile}} {{jalan/menuju/sumber.c}}`
|
||||
|
||||
- [O]ptimalkan progam yang disusun agar dapat dijalankan lebih cepat:
|
||||
|
||||
`gcc {{path/to/source.c}} -O{{1|2|3|fast}} -o {{path/to/output_executable}}`
|
||||
`gcc {{jalan/menuju/sumber.c}} -O{{1|2|3|fast}} {{-o|--output}} {{jalan/menuju/program}}`
|
||||
|
||||
- Tampilkan versi penyusun:
|
||||
|
||||
`gcc --version`
|
||||
|
Reference in New Issue
Block a user