Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Convert project from C to C++
Convert project from C to C++ [message #485306] Fri, 11 September 2009 09:55 Go to next message
Eclipse User
Originally posted by: augustbering.yahoo.com

Anybody knows if it's possible to convert a C project to C++? Currently I
don't see the Cygwin C++ Compiler in my "C/C++ Build->Settings" pane.
Re: Convert project from C to C++ [message #485820 is a reply to message #485306] Tue, 15 September 2009 07:59 Go to previous messageGo to next message
Eclipse User
Originally posted by: billinares.bluewin.ch

What do you mean convert to C++? A C++ compiler should be able to compile
c code with no problems (actually, you might catch some problems that the
c-compiler let through).
Re: Convert project from C to C++ [message #485854 is a reply to message #485820] Tue, 15 September 2009 10:34 Go to previous messageGo to next message
Eclipse User
Originally posted by: augustbering.yahoo.com

Yes, but I created a C project with CDT and now this project won't build
c++ files, because there is no c++ compiler tool in the tool settings...
Lots of the files in my project have individual settings so I'd like to
not have to recreate the project from scratch as a C project.
Re: Convert project from C to C++ [message #485866 is a reply to message #485854] Tue, 15 September 2009 11:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: billinares.bluewin.ch

Correct me if I'm wrong, but I don't think Eclipse makes any difference
between C and C++ projects. In any case you need a C++ compiler (maybe you
forgot to install it along with the C compiler). Then instruct your
builder to use it to compile your C-code. As long as you are not mixing C
and C++ code that should do it.
Re: Convert project from C to C++ [message #485867 is a reply to message #485854] Tue, 15 September 2009 11:20 Go to previous messageGo to next message
Derek is currently offline Derek
Messages: 60
Registered: July 2009
Member
On 15/09/2009 11:34, agge wrote:
>
> Yes, but I created a C project with CDT and now this project won't build
> c++ files, because there is no c++ compiler tool in the tool settings...
> Lots of the files in my project have individual settings so I'd like to
> not have to recreate the project from scratch as a C project.
>
I don't know of a way to convert a C project into a C++ project. I think
you need to create your project again.

--
Derek
Re: Convert project from C to C++ [message #486101 is a reply to message #485866] Wed, 16 September 2009 11:10 Go to previous messageGo to next message
Eclipse User
Originally posted by: augustbering.yahoo.com

Unfortunately it does... Just create a C and C++ project and compare the
tool settings you get. This should probably be an easy fix for anybody
working on CDT, but I guess I'll just have to recreate the project and
take the road of pain.
Re: Convert project from C to C++ [message #880308 is a reply to message #486101] Fri, 01 June 2012 20:37 Go to previous message
Hans Ashlock is currently offline Hans Ashlock
Messages: 1
Registered: June 2012
Junior Member
If anyone still cares... Just add

<nature>org.eclipse.cdt.core.ccnature</nature>

to the the <natures></natures> tag of your .project file.
Previous Topic:Relative include paths are still not supported
Next Topic:Build Configuration
Goto Forum:
  


Current Time: Fri Sep 19 16:04:08 GMT 2014

Powered by FUDForum. Page generated in 0.02493 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software