The development and construction of Windows/C + + Environment

Source: Internet
Author: User

Through on-line query, compare accidentally chose Cygwin as the compilation environment, Code::Blocks as IDE. The environment is well-equipped, temporarily feel very useful. The steps are now documented below.

First, Windows use Cygwin to build A/C + + development environment GCC

I'm referring to this blog post: http://blog.sina.com.cn/s/blog_143cf62360102wrgd.html. To prevent the original address from being lost, I'll copy it here.

1: First go to the website www.cygwin.com download cygwin Windows System installation package, 32-bit system download steup-x86.exe,64 bit system download Steup-x86_64.exe, the interface is as follows.

2: Double click on the downloaded Cygwin installation package, the following interface appears, click Next.

3: After the following interface, the default is the first option, which means to download and install from the network (not the full installation package downloaded from the official website, just install the boot program), the second option is to download only not install, the third is to install from the local (meaning that you have downloaded the required installation files). I haven't downloaded the file yet and want to install it, so select the default first item, then click Next.

4: Here to choose the installation directory, generally have a dedicated development tool for the installation directory, I here for C:\Develop, and under this file new to install Cygwin directory, so the total directory is C:\Develop\MinGW. Select all users, then click Next.

5: Here to choose the storage location for the installation package that will be downloaded, I choose the download directory in the C drive. Select OK and then click Next.

? 6: Select Default and click Next.

7: Flash a page after the appearance of the following interface, choose the blue URL, which is the domestic Zhong Ke mirror station, so the speed is faster, the Northeast can also choose the above one, is the Dalian East Soft College mirror station, separated closer, should be faster than the Zhong Ke.

8: After this page, is the most important place, will automatically go to the next step.

9: Search Gcc-core, gcc-g++, make, GDB, binutils in the red line, and all of the above items are under the Devel folder.

The original 5.3.0-5 location is also Skip, after one click, the following interface appears, the other is the same.

Gcc-coregcc-g++makegdbbinutils

10: Then click Next in the lower left corner.

? 11: Here to check the project to be installed, and the above selection is not the same, add a lot of related files, bad check, but generally no problem, so directly click Next.

? 12: Start downloading and installing Cygwin at this time, a little longer.

13: If necessary, create a shortcut on the desktop (first item) and Start menu (the second item) because I don't use terminal mode, but sometimes it may be necessary, so just select the second item and click Finish.

? 14: Add the Bin directory under the installation directory to the PATH environment variable. I'm using Windows 10, and the interface is not the same as the other versions. Add environment variables to the specific method of Baidu itself.

? 15: Verify that the installation is successful. Open a Command Prompt window (self-Baidu), enter gcc-v, the following conditions indicate that the installation was successful.

In fact, after loading Cygwin can be in the Cygwin environment to write C program, like this:

[Email protected] ~$ VI hello.c[email protected] ~$ lshello.c[email Protected] ~$ cat Hello.c#include<stdi O.h>int main (void) {        printf ("Hello World");        return 0;} [Email protected] ~$ gcc hello.c      
Second, the installation of Code::block

1. Download

Download here: Http://www.codeblocks.org/downloads/26.

2. After the installation is complete, you need to configure the compiler.

Then a few of the marked arrows are needed to set the note:

The development and construction of Windows/C + + Environment

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.