How do VC ++ compiler Windows programs with MinGW!

Minimalist GNU for Windows MinGW is an abbreviation, because there is a GNU compiler GCC, so we can use it to compile the windows in the windows system native exe program or dll, without the need by means of Microsoft Visual C ++ environment up!

MinGW installation is very simple, of a total of two steps: download, click Install.
  • Download Click here MinGW5.1.3, the new version can be seen on sourceforge.
  • Click on the exe file, enter the installation interface, select at least gcc compiler.
Then go to the bin directory under the installation directory, you can see some of the procedures used to compile the GNU to, such as: gcc, g ++, make and so on.
If you are a bash user, you can also download a separate MinGW in the bash package, download, unzip the package to the installation directory of MinGW can!

Best to download a MSYS (Minimal SYStem), click here to download so you can use such as GNU bash the procedure.
After installing MSYS, click Start MSYS icon to open a bash window. Default will MSYS C: mount / c directory, D: drive letter to mount / d directory, and so on; and will mount to the install directory mingw / mingw directory.

You can now use GNU make to compile the windows of the program.

For example, you can put the source code solution ruby1.8.6 compression, and then enter the source directory ruby1.8.6, do:
./configure && && the make the make the Test
. Ruby can be compiled under the windows
to be installed just compiled ruby explanation is required only if:
the make / ruby && DESTDIR = / ruby the make install
will install MSYS of the ruby / ruby directory down.
Published 46 original articles · won praise 7 · views 80000 +

Guess you like

Origin blog.csdn.net/yangbo_hr/article/details/2285670