2013年10月4日 星期五

在Windows XP下使用Geany作為C++編譯器


Step1:

download Geany: http://www.geany.org/Download/Releases

Windows Binaries geany-x.xx.x_setup.exe - Full Installer including GTK x.xx.

Step2:

download gcc(GNU Compiler Collection): MinGW http://sourceforge.net/projects/mingw/files/

Looking for the latest version? Download mingw-get-setup.exe (86.5 kB)

Step3:

install g++: open MinGW Installation Manager

install all the packages of mingw32-gcc-g++

Step4:

append these to the Environment Variable "Path"

C:\MinGW\;C:\MinGW\bin;C:\MinGW\libexec\gcc\mingw32\x.x.x\;

*replace x.x.x with the current version

Step5:

用Geany隨便打開一個C++檔案->組建->設定組建命令

修改以下參數:

編譯: g++ -m32 %f -o %e.exe

組建: g++ -m32 %f

執行: start %e.exe && del "%0" && exit

 

※罕見問題:

你的電腦一定要能正常執行.bat檔

無法執行的原因之一是你使用了chcp 65001(UTF-8)

請用 chcp 950 調回繁體中文語系方可正常使用

沒有留言:

張貼留言