Window7 using MinGW to compile the C + + source program at the command line (starting from zero, setting Path,library_path,c_include_path)

Source: Internet
Author: User

1, in order to compile the window command line under the C/S source program, for beginners, need to be configured under the window environment gcc and g++ compiler, I use MinGW, is: http://sourceforge.net/project/ showfiles.php?group_id=2435;

2, download complete to click Mingw-get-setup.exe, all the way next, until the last open MinGW Installer Manager interface, such as;

3, select the red circle above, mark for installation, and then select Installation->apply changes, such as;

4, choose Apply, complete can;

5. Configure environment variables, select the environment variables, such as advanced system settings, right-click Properties, computer, such as;

6, set the path directory, select the system variables, find the path variable, at the end of the installation mingwbin you put in the last, for example; C:\MinGW\bin, preceded by a colon;

7, new Library_path variable, in its value added "C:\MinGW\lib" This is the standard inventory put the path;

8, new C_include_path variable, add C:\MinGW\include in its value this is the path of the INCLUDE lookup header file;

9, open the command line, enter Gcc-v, appear as, then indicates the configuration is successful;

10, compile Hello World, write Hello World with the editor, name Main.c, save the working directory, then switch to the working directory at the command line, then run GCC main.c, generate a.exe, and then input A, enter, compile successfully, such as;

http://blog.csdn.net/ksksjipeng/article/details/52150779

Window7 using MinGW to compile the C + + source program at the command line (starting from zero, setting Path,library_path,c_include_path)

Related Article

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.