We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm a novice with STM32 and Keil. I'd like to use a BMP280 C library and a RFM69 C++ library. I wasn't able to understand how to use both in the same project. Can someone share some advice/guidance? The C++ library uses .hpp files and they were not recognized. I was probably making a mistake. Thank you in advance for any help.
Frank
Btw - see: "How do I call C++ code from C?"
www.keil.com/.../4245.htm
manually writing the prototype multiple times with different formats in different files is a maintenance nightmare!
That example misses the usual practice of using a #ifdef __cplusplus so that the same header can be used by both .c and .cpp files:
#ifdef __cplusplus extern "C" { #endif void myFunc(int); #ifdef __cplusplus } #endif