2010年9月21日 星期二

使用 MinGW + Notepad++ 來寫 C++

1. 下載 Notepad++
2. 下載 Notepad++ plugin -- NppExec
3. 下載 MinGW-5.1.6.exe,安裝起來

4. 使用 Notepad++ 新增檔案
// hello.cpp
#include // cout
#include "conio.h" // getch
#include // TCHAR

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
    std::cout << "Hello World!\n";
    getch();
    return 0;
}


5. 使用 NppExec套件, 輸入
C:\MinGW\bin\g++.exe "$(FULL_CURRENT_PATH)" -o $(NAME_PART)

6. 執行後, 即會 Complier 成 exe 檔案 !!

沒有留言: