Use eclipse + CDT + mingw for Windows Programming (Preface + Part 1)

Source: Internet
Author: User

Http://www.cnblogs.com/inshion/archive/2009/01/09/1372704.html

Preface


I saw a book called visual
C ++ role-playing gamesProgramDesign is written by a Japanese called Min Ben qianxun. In my opinion, the content of this book is quite rich, but the content of each aspect is not too detailed, so I want to rely on it all.
It is very difficult to get started from ignorance. However, the biggest benefit of this book is that it provides a series of demos to demonstrate one aspect of the book. (These and eclipse
Does CDT have any relationship? = 0 = | ...... Don't worry, haha, it's about \ ^ _ ^ /)

The first two chapters of the book mainly refer to some general descriptions, which basically do not involve specific techniques.
. Starting from Chapter 3 "windows program design", we will enter the specific technical links. Just two days ago, I studied ecilpse + CDT for C ++ programs (Doesn't that matter?
And I think the content in Chapter 3 is very helpful for Windows program design and object-oriented programming ideas. So I started with eclipse + CDT
The content has been practiced. Specifically, it is to build a C ++ environment on eclipse, and then make a demo similar to the example program in the book.

This articleArticleI will summarize the various problems encountered throughout the process, and also review some content about windows and object-oriented program development.

Part 1 Development Environment Configuration
Eclipse + CDT
I used Eclipse IDE for C/C ++ developers downloaded from eclipse.org. Check that eclipse3.4.1 + CDT 5.0.1.200809120802.
Mingw
I use a MinGW-3.1.0-1.
Install mingw in c: \ mingw and run Eclipse IDE. It should be mentioned that the mingw I downloaded is a fully locally installed version. If you install it online, We recommend that you select all components when installing them. Otherwise, it may cause considerable trouble in subsequent use.
Test whether it is successful:

First, create a new project in eclipse. Choose File> New> C ++.
Project-> executable-> Hello World C ++
Project. After the project is created, a CPP file is automatically generated. Open it to see if it is a simple main function. First build and then run. Generally, it passes normally.

Create a makefile project. Choose File> New> C ++ project> makefile.
Project-> Hello World C ++ project. A list is displayed on the right of the wizard, with -- Other toolchain --
And mingw GCC, Select mingw gcc . Enter a name to create the project, and then build the project, Error prompted (cannot run program "make": Launching failed) . Therefore, go to the mingw installation directory c: \ mingw \ bin. Copy mingw32-make.exeto make.exe. . Build and run again. Everything is normal. Now, the Environment configuration is complete.

In the next section, I will introduce the idea of Windows Programming and object-oriented programming. Under the guidance of this idea, I will start program development.

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.