Skip to main content


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 UserFriend
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 UserFriend
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 UserFriend
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 UserFriend
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 DerekFriend
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 UserFriend
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 messageGo to next message
Hans Ashlock is currently offline Hans AshlockFriend
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.
Re: Convert project from C to C++ [message #1763510 is a reply to message #880308] Tue, 16 May 2017 20:17 Go to previous message
Malcolm Watt is currently offline Malcolm WattFriend
Messages: 1
Registered: May 2017
Junior Member
Thanks! That actually works perfectly!
Previous Topic:Organizing imports automation
Next Topic:Build not Found error
Goto Forum:
  


Current Time: Fri Mar 29 12:33:36 GMT 2024

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

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

Back to the top