[En-Nut-Discussion] C++

Harald Kipp harald.kipp at egnite.de
Wed Sep 18 16:23:40 CEST 2013

Hi Marcin,

On 18.09.2013 15:05, Marcin Trendota wrote:
> On Wednesday 18 of September 2013 1:42:00 PM 
> bon at elektron.ikp.physik.tu-darmstadt.de wrote:
>>     Marcin> Or am i missing something?
>> Your contribution?
> Right. Here is my patch: http://pastebin.com/tW95481Z. Note - i 
> modified only files i needed for my (simple!) example application.

I've removed

 extern "C" {

some time ago from Nut/OS header files, because it had been badly
maintained by developers (including me).

I'd suggest to use this in your C++ sources instead, e.g.

 #include "myclass.hpp"
 extern "C" {
 #include <sys/version.h>
 #include <sys/heap.h>
 #include <sys/timer.h>

This way no modification of Nut/OS code is required.

Beside this, some platforms may also require linker script patches to
fully support C++ (static constructors).



More information about the En-Nut-Discussion mailing list