Hi I am currently developing a C application in eclipse and now I need to compile a library which uses C++. Is there a way to add .cpp handling (MinGW C++ Compiler) to and existing C Project in Eclipse CDT?
To use Eclipse for C/C++ programming, you need a C/C++ compiler. On Windows, you could install either MinGW GCC or Cygwin GCC. Choose MinGW if you are not sure, because MinGW is lighter and easier to install, but having less features.
Launch Eclipse → Help → Install New Software → In "Work with" field, pull down the drop-down menu and select "Kepler - http://download.eclipse.org/releases/kepler" (or juno for Eclipse 4.2; or helios for Eclipse 3.7). In "Name" box, expand "Programming Language" node ⇒ Check "C/C++ Development Tools" ⇒ "Next" ⇒ ...
In Eclipse, go to the "File" menu, then "New", then "C++ Project" if it's there. If not, choose "Project", then find "C/C++" in the list of wizards, click the "+" sign to expand it, and choose "C++ Project". A dialog box will ask whether to open the C/C++ perspective. Answer "yes", and remember this decision.
#2) Click Help =>Install New Software. In the “Available Software” dialog, enter “Kepler – http://download.eclipse.org/releases/kepler” (or Juno for Eclipse 4.2; or Helios for Eclipse 3.7) in the “Work With” field or pull down the dropdown menu and select the above link.
According to this post on the Eclipse forum, just add
<nature>org.eclipse.cdt.core.ccnature</nature>
to the the <natures></natures>
tag of your .project
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With