Including rtems.h from C++

Isaac Gutekunst isaac.gutekunst at vecna.com
Fri Jun 3 18:58:04 UTC 2016


HI Patrick,

That solves the problem! Thanks!

Isaac

On 06/03/2016 03:00 AM, Patrick Gauvin wrote:
> Hi Isaac,
>
> Try adding -D_GNU_SOURCE to your compiler arguments. You may be using
> -std=..., for which certain arguments restrict things such that those
> errors pop up. Using the default value or adding the GNU source define
> resolves these errors in my experience.
>
> -Patrick
>
> On Thu, Jun 2, 2016 at 11:15 AM, Isaac Gutekunst
> <isaac.gutekunst at vecna.com> wrote:
>> Hello everyone,
>>
>> I'm getting a lot of error messages, presumably because I'm including
>> rtems.h from a C++ file.
>>
>> I'm running rtems master as of yesterday.
>>
>> I'm getting a lot errors such as:
>>
>> /home/igutek/rtems/lib-rtems-atsamv/arm-rtems4.12/atsamv/lib/include/rtems/score/timestamp.h:
>> In function 'uint32_t _Timestamp_Get_nanoseconds(const Timestamp_Control*)':
>> /home/igutek/rtems/lib-rtems-atsamv/arm-rtems4.12/atsamv/lib/include/rtems/score/timestamp.h:283:33:
>> error: 'bintime2timespec' was not declared in this scope
>>    bintime2timespec( _time, &_ts );
>>
>> As well as:
>>
>> error: invalid use of incomplete type 'const Timestamp_Control {aka const
>> struct bintime}'
>>
>>
>> Is this a bug, or should I do something different? I'm including the files
>> within an extern "C" { } block.
>>
>> Thanks,
>> Isaac
>>
>>
>> _______________________________________________
>> users mailing list
>> users at rtems.org
>> http://lists.rtems.org/mailman/listinfo/users


More information about the users mailing list