MinGW

user-pic
Vote 0 Votes

MinGW 是 "Minimalist GNU for Windows" 的縮寫,
簡單講它就是 Linux GCC 移植到 Windows 下的 C/C++ Compiler
Cygwin 不同的是, 編好的執行檔不需要其他的 DLL 檔
來個 hello, world 測一下
#include

int main() {
printf("hello, world\n");
}

C:\MinGW\bin>gcc hello.c -o hello.exe

C:\MinGW\bin>hello.exe
hello, world

Linux 程式移植到 Windows, 會有一些地方需要改,
例如 #include <sys/socket.h> 要改成 #include <Winsock2.h>

ref. MinGW 與 Cygwin 的不同處

2 Comments

| Leave a comment

<sys/socket.h> 變成 html tag, 沒秀出來, 已修正

最後一句的兩個#include有啥不同

Leave a comment

About this Entry

This page contains a single entry by Pank published on April 19, 2011 2:54 AM.

aliases include format was the previous entry in this blog.

DavMail Gateway is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives