"compiler及其環境在附件只能在windowsXP DOS command下建立"
請至 djgpp web side 相對應的目錄下尋找本文中提到的檔案.
先在您的硬碟上(假設您欲安裝至 C 槽)建立一子目錄為 djgpp, 即 mkdir c:\djgpp, 並將之後所下載的檔案皆放置在該目錄下.
重新啟動電腦並至 DOS mode 即可執行 C/C++ compiler.
先在您的硬碟上(假設您欲安裝至 C 槽)建立一子目錄為 djgpp, 即 mkdir c:\djgpp, 並將之後所下載的檔案皆放置在該目錄下.
- 下載 unzip386.exe, 此檔為解 .zip 壓縮檔之工具程式.
- 下載:
- readme.1st
- djdev201.zip
- faq210b.zip
- 下載:
- txi390b.zip
- gcc2721b.zip
- bnu27b.zip
- mak37b.zip
- gpp2721b.zip
- lgp271b.zip
- gdb416b.zip
- 下載 csdpmi3b.zip
重新啟動電腦並至 DOS mode 即可執行 C/C++ compiler.
如何邊譯程式
- 請用任何編輯軟體寫 C/C++ 程式, 如用 DOS 下的 edit.
- 將編輯好的程式存檔, 若您是寫 C 程式, 則存 xxx.c; 若寫 C++ 程式, 則存 xxx.cc
- 編譯 C 程式, 執行 gcc xxxx.c -o xxxx.exe; 編譯 C++ 程式, 執行 gxx xxx.cc -o xxx.exe各舉 C 和 c++ 簡單例子並編譯:
#include <stdio.h>
int main()
{
printf("Hello, world.\n");
}
因此編譯此程式(hello.c)的方式為 gcc hello.c -o hello.exe
編譯完後執行 hello, 會看到 Hello, world.
/
// hello.cc
#include <iostream.h>
int main()
{
cout <<"Hello, world." << endl;
}
編譯此程式(hello.cc)之方式為 gxx hello.cc -o hello.exe
編譯完後執行 hello, 也會看到 Hello, world.字樣.
DJGPP 介紹
DJGPP is a complete 32-bit C/C++ development system for Intel 80386 (and higher) PCs running DOS. It includes ports of many GNU development utilities. The development tools require a 80386 or newer computer to run, as do the programs they produce. In most cases, the programs it produces can be sold commercially without license or royalties.
Introduction
Why are you here? (common questions with answers)
Zip Picker (helps you decide what to download)
About DJGPP Version 2
DJGPP Project Overview
The history of DJGPP
Official DJGPP Year 2000 Statement
Current DJGPP status vs Windows 2000 and XP (unofficial)
Documentation
DJGPP 介紹
DJGPP is a complete 32-bit C/C++ development system for Intel 80386 (and higher) PCs running DOS. It includes ports of many GNU development utilities. The development tools require a 80386 or newer computer to run, as do the programs they produce. In most cases, the programs it produces can be sold commercially without license or royalties.
Introduction
Why are you here? (common questions with answers)
Zip Picker (helps you decide what to download)
About DJGPP Version 2
DJGPP Project Overview
The history of DJGPP
Official DJGPP Year 2000 Statement
Current DJGPP status vs Windows 2000 and XP (unofficial)
Documentation
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。