Learn C: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (2個修訂) |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
編譯C語言 | 編譯C語言 | ||
== installation == | |||
install [http://gcc.gnu.org gcc] package of [http://www.cygwin.com/ cygwin] | install [http://gcc.gnu.org gcc] package of [http://www.cygwin.com/ cygwin] | ||
== compile == | |||
place all *.c to c:\cygwin\c | place all *.c to c:\cygwin\c | ||
execute Cygwin Bash Shell | execute Cygwin Bash Shell | ||
cd /c | cd /c #switch to the folder named c | ||
cc filename.c | cc filename.c #will compile filename.c, and generate a.exe) | ||
./a.exe | ./a.exe #or ./a will show the result | ||
== trouble? == | |||
How can I copy and paste into Cygwin console windows? | How can I copy and paste into Cygwin console windows? | ||
: 解決策略:開始 -> 所有程式 -> Cygwin -> Cygwin Bash Shell 按滑鼠右鍵 -> 內容 -> 選項分頁 -> 勾選快速編輯模式(Quick edit mode) Source: [http://www.gigascale.org/softdevel/faq/24.html Cygwin copy and paste] | : 解決策略:開始 -> 所有程式 -> Cygwin -> Cygwin Bash Shell 按滑鼠右鍵 -> 內容 -> 選項分頁 -> 勾選快速編輯模式(Quick edit mode) Source: [http://www.gigascale.org/softdevel/faq/24.html Cygwin copy and paste] | ||
| Line 17: | Line 20: | ||
got trouble | got trouble | ||
cc -help | cc --help | ||
[[Category:Programming]] | |||
Latest revision as of 14:36, 21 June 2009
編譯C語言
installation[edit]
compile[edit]
place all *.c to c:\cygwin\c
execute Cygwin Bash Shell
cd /c #switch to the folder named c cc filename.c #will compile filename.c, and generate a.exe) ./a.exe #or ./a will show the result
trouble?[edit]
How can I copy and paste into Cygwin console windows?
- 解決策略:開始 -> 所有程式 -> Cygwin -> Cygwin Bash Shell 按滑鼠右鍵 -> 內容 -> 選項分頁 -> 勾選快速編輯模式(Quick edit mode) Source: Cygwin copy and paste
got trouble
cc --help