2019-02-13 05:19 PM
I want to include Arduino ADXL345 C++ library (ADXL345.cpp/ADXL345.h) in STM32 CubeMX generated C project.
I'm getting the following compilation errors with CubeMX C project with .cpp header file having 'Class' type declaration in Atollic -
unknown type name 'class' ADXL345.h /STM32_SPI/Inc line 115 C/C++ Problem
How to resolve this?
2019-02-13 05:27 PM
So you're going to have to keep things separate, and provide interfacing to C API functions, or wrappers around C++ ones.
Define access to HAL functions via extern "C"