Compilation errors with STM32 CubeMX C project with .cpp header file having 'Class' type declaration
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-02-13 5: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?
Labels:
- Labels:
-
STM32CubeMX
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-02-13 5: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"
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
