C++ in a C project
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-11-24 2:58 AM
Posted on November 24, 2016 at 11:58I am working on a project with the followingNUCLEO-F401RE boardAC6 IDEA freeRTOS project with, currently, 2 tasks.I want to add a C++ class, with C wrappers into the project.I can add the files, with .cpp extensions but the eclipse doesn't compile the files.I have managed, by a set of fairly elaborate steps to 'hack' something, but I can't believe that there is no simple way to do this.Any advice appreciated,
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-12-06 10:49 PM
Posted on December 07, 2016 at 07:49
You have two options.
- Use a C++ compiler.
- Rename to .c and #if out the C++ lines.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-12-07 12:02 AM
Posted on December 07, 2016 at 09:02
You can take a look at the demo projects at
https://github.com/micro-os-plus/eclipse-demo-projects
, for example the F4DISCOVERY one.All are C++ projects, and all use
, a system fully written in C++.