system-programming:helloworld
تفاوتها
تفاوت دو نسخهٔ متفاوت از صفحه را مشاهده میکنید.
| system-programming:helloworld [2024/04/19 18:00] – ایجاد شد pejman | system-programming:helloworld [2024/06/18 01:20] (فعلی) – حذف شد pejman | ||
|---|---|---|---|
| خط 1: | خط 1: | ||
| - | ====== Hello World ====== | ||
| - | |||
| - | $ sudo apt install build-essential gdb valgrind | ||
| - | |||
| - | $ gcc --version | ||
| - | gcc (Debian 12.2.0-14) 12.2.0 | ||
| - | Copyright (C) 2022 Free Software Foundation, Inc. | ||
| - | This is free software; see the source for copying conditions. | ||
| - | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| - | |||
| - | $ make --version | ||
| - | GNU Make 4.3 | ||
| - | Built for x86_64-pc-linux-gnu | ||
| - | Copyright (C) 1988-2020 Free Software Foundation, Inc. | ||
| - | License GPLv3+: GNU GPL version 3 or later < | ||
| - | This is free software: you are free to change and redistribute it. | ||
| - | There is NO WARRANTY, to the extent permitted by law. | ||
| - | |||
| - | $ gdb --version | ||
| - | GNU gdb (Debian 13.1-3) 13.1 | ||
| - | Copyright (C) 2023 Free Software Foundation, Inc. | ||
| - | License GPLv3+: GNU GPL version 3 or later < | ||
| - | This is free software: you are free to change and redistribute it. | ||
| - | There is NO WARRANTY, to the extent permitted by law. | ||
| - | |||
| - | $ valgrind --version | ||
| - | valgrind-3.19.0 | ||
| - | |||
| - | <code C> | ||
| - | /* first-example.c */ | ||
| - | #include < | ||
| - | int main(void) | ||
| - | { | ||
| - | printf(" | ||
| - | return 0; | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | $ gcc first-example.c | ||
| - | $ ./a.out | ||
| - | Hello, world! | ||
| - | $ rm a.out | ||
| - | |||
| - | | ||
| - | * a.out : assembler output | ||
| - | |||
| - | $ gcc first-example.c -o first-example | ||
| - | $ ./ | ||
| - | Hello, world! | ||
| - | $ rm first-example | ||
| - | |||
| - | $ make first-example | ||
| - | cc | ||
| - | $ ./ | ||
| - | Hello, world! | ||
| - | $ rm first-example | ||
system-programming/helloworld.1713537030.txt.gz · آخرین ویرایش: 2024/04/19 18:00 توسط pejman
