This environment is suitable for beginners to avoid bloated vs ...
1. Download
mingw:http://mingw.org/or click Downloads to download directly in SourceForge
looking for the latest version? Download mingw-get-setup.exe (86.5 kB) <<----your choice.
After download, follow the default location (C:\MinGW\ to configure environment variables), the installation process will be networked download components, to avoid the use of VPN, will be delayed. Visual inspection takes 3-5 minutes. After installing the component library, it is recommended to install the recommended components depending on your personal situation.
Then please download notepad++, where there is not said, after installation set as the default text editor!
2. Configure Environment variables
Two different ways: the same effect
①, My Computer-Properties-Advanced system settings-environment variables-System Variables path--add C:\MinGW\bin\
②, Ctrl+r Run Registry Editor regedit, locate the [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment] directory, Modify the value of the string value "Path" at the end Plus "; C:\MinGW\bin\ "(without quotation marks)
3. Restart your computer
Open the DOS command line tool and use the MinGW tool in any directory with GCC, g++, GDB, and so on. (e.g. enter "GCC--help" to see instructions for use)
4. notepad++ setting
① Press F5, enter box
"Cmd/k cd/d" $ (current_directory) "&& gcc-ffreestanding-std=gnu99-wall-g3-o0-o" E:\output\$ (name_part). exe "$ (file_name)" & PAUSE & EXIT "
Then save as "compile/compile" and set the shortcut key to CTRL+F1. (assuming that the output program's directory is E:\output, the next bit.) )
② Input Box again
"Cmd/k cd/d" E:\output\ "&&" $ (name_part). exe "& PAUSE & EXIT"
Save as "Run program/run" and set the shortcut key to ALT+F1.
③ Input Box again
"Cmd/k cd/d" E:\output\ "&& gdb" $ (name_part). exe "& EXIT"
Save as "debug/debug" and set the shortcut key to Ctrl+f2.
④ Input Box again
"Cmd/k cd/d" E:\output\ "&& objdump-slzdeg-m Intel" $ (name_part). exe ">" $ (Name_part). S "&&" $ (name_p ART). S "& EXIT"
Save As Disassembly/disassemble, set shortcut key to Alt+f2.
" $ (name_part) " refers to the file name of the currently edited file, " $ (full_current_path) " represents the full path to the current action file and includes the file name and suffix name.
Configuration is complete, we start testing under:
Finish
Reference: http://blog.csdn.net/tangweide/article/details/7071103
This article is from the "Seoul and the same Sorrow" blog, please be sure to keep this source http://mannerwang.blog.51cto.com/12009183/1846491
MinGW & notepad++ Building a compiled C + + environment