MinGW can be installed directly under Ubuntu (sudo apt-get install mingw32 mingw32-binutils mingw32-runtime, with examples, easy to use, pro-test success) Good

Source: Internet
Author: User

MINGW: Programs that compile Windows under a Linux system

Can be installed directly under Ubuntu:
sudo apt-get install mingw32 mingw32-binutils mingw32-runtime

The post-installation compiler can:
i586-mingw32msvc-g++ (compiling C + + programs)
I586-MINGW32MSVC-GCC (compile C program)

Usage and gcc/g++ are very similar.
such as the HELLO.C program:
#include "Windows.h"
int WINAPI WinMain (hinstance hinstance,
HInstance hPrevInstance,
PSTR szCmdLine,
int icmdshow)
{
MessageBox (NULL, "Hello", "Hello Demo", MB_OK);
return (0);
}

Compile:
I586-MINGW32MSVC-GCC Hello.c-o Hello.exe-mwindows

Note:-mwindows indicates that it compiles a Windows program and does not require this parameter if the console (command line) program is compiled.

If you have wine installed, you can also test this program:
Wine Hello.exe

http://tieba.baidu.com/p/733815195

Http://www.cnblogs.com/lvdongjie/p/3763032.html

MinGW can be installed directly under Ubuntu (sudo apt-get install mingw32 mingw32-binutils mingw32-runtime, with examples, easy to use, pro-test success) Good

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.