Developing c C + + programs with CDT plugins under Eclipse

Source: Internet
Author: User
Tags include version variable
C++| program Eclipse to develop C C + + program with CDT plugin                                        author no two   http://blog.csdn.net/sundaylin1 CDT plugin Download HTTP://WWW.ECLIPSE.ORG/CDT/2 The CDT is just a shell. true compiler c C + + is GCC, GDB, and make   want to use downloads under Windows MinGW http://www.mingw.org/download.shtml  I was MinGW-3.1. 0-1.exe (there is already a newer version when I download it) 3 installation mingw  just keep next.   (let's say you're in D) 4 set the environment variable for MINGW   Create a new text file   Paste the following: Windows R Egistry Editor Version 5.00[hkey_local_machine ystem\controlset001\control ession manager\environment] "PATH" = "D:\\ mingw\\bin;%path% "" Library_path "=" D:\\mingw\\lib "" c_include_path "=" D:\\mingw\\include "" CPLUS_INCLUDE_PATH "=" D " : \\mingw\\include\\c++\\3.2.3;d:\\mingw\\include\\c++\\3.2.3\\mingw32;d:\\mingw\\include\\c++\\3.2.3\\backward ;D: \\MinGW\\include "; registry writing is D:\\jboss with" \ "  semicolon after this is the comment and then change the follow-up for reg  import this registry note!! After you import the registry, look at the environment variables   Click "OK" the environment variable will not take effect!!! To test if the environment variable is set correctly in the run-cmd  g++ if "g++ is not an internal or external command ..." So your setup is right on your first C + + program 1 open Eclipse New->project->standard make C + + project and enter the project name Test2 in project->properties- >c/c++ make Project there   build command change to "Mingw32-make"   Press "apply" "OK"  3 new->file   Fill in main.cpp  to open him   paste   #include <iostream>using namespace Std;int main (void) {     cout << "Hello World";    return 0;} 4 new->file fill in "Makefile" without follow-up name   post all:    g++ main.cpp -o main NOTE!! Before "g++" is the TAB key with a space is not OK "-O" after the string is the name of the generated EXE 5 window->show view->make targets  add maketargets  Press "OK" on the line & nbsp;  then double click on this maketargets it will automatically help you make build Exe6 in project->properties->c/c++ make Project->binary parser  Convert elf parser to PE Windows Parser7   run->run as->c local application  you'll see   Hello world  down there.

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.