Compile C++ in C

Hello friends, I am developing a code with a orientus IMU, the company advance navigation

develop a code in C, but now I want the shield of Navio +, but the code examples are developed in C ++, as I do to attach codes ??? or bring everything to a single language ???


Hello there!

C++ is mostly compatible with C. You can use g++ instead of gcc in order to compile C code.
There’re some differences between modern C (C99) and modern C++ which render them partly incompatible, though. You should read up on them. There’re proper ways to use C code from C++, i.e. extern C. Please, have a look at it!

I’m not sure what do you mean under

What exactly do you want to do?

If you provide us with more information, we can help you with an advice.

hello @staroselskiy

I have this IMU,

the manufacturer states that you can compile both C and C ++, C always use this, but now I use the Navio try to compile in C ++ but I have this error, it could solve ??

image’m just using the SDK in C IMU Orientus compiled with Pi

thank you very much for your help