Use Eclipse to run C and C ++ programs in Windows.

Source: Internet
Author: User

Use Eclipse to run C and C ++ programs in Windows.

I believe that everyone wants to run C and C ++ programs in Eclipse, but they have no idea how to configure them. Google has been using the configuration method in the gcc environment for a long time, after three or four software packages are installed, the configuration still fails.

So the method I introduced now is not based on the GCC compiler, but on the VC.

 

Step 1:

You need to download the Eclipse for C ++ package. Of course, you can also install the plug-in by yourself (I do not recommend it unless you are idle and have a ready-made job, installation force ?)

:

Http://www.eclipse.org/downloads/


After downloading, decompress the package and click eclipse.exe to run the program. Of course, you must install JDK before running the program. Eclipse is written in Java and requires the JRE runtime environment.


Step 2:


 



Step 3:



Step 4:

The standalone project name, right-click the new SourceFile, add a C language file, and write a simple HelloWorld program.




Step 5:


Step 6:



Running result:






If this still fails, I will switch to JJ ~~~~


How to Use Eclipse to write C Programs

You use Eclipse to write C/C ++ programs. Eclipse is just a plug-in Framework Platform. It has many languages C/C +
+/C #/Java and other basic programming environments. It cannot be programmed by itself. Eclipse is a basic platform.
Into what kind of work. You still need external plug-ins. You need to install the C/C ++ plug-in (CDT) to write the C program ). You installed
CDT plug-in? If not, you cannot write C Programs. An error occurs.
Before installing CDT, make sure that the gnu c compiler (gnu c compiler, GCC) and all accompanying tools (make, binutil, and GDB) are available. Install the Cygwin toolkit on Windows .. The alternative solution for Cygwin is Minimalist GNU for Windows (MinGW), so you must download a MinGW. MinGW mainly provides GCC, GDB, and Make for compiling C/C ++ files.
Does it seem very troublesome? Indeed. For beginners, I still think VC ++ 6.0 is suitable. It is not as complicated as eclipse. If you still want to use eclipse to write C/C ++, you can reply to me and leave your mailbox together. I will teach you how to install it in detail. If I want to explain it in detail, I feel very troublesome and lazy!

Sequence problems when running simple C Programs in Eclipse

The windows cygwin MinGW compiler indicates that no exception exists... try to recompile .....




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.