‎2019-06-29 09:16 PM
Dear Members,
Is it possible that I combine C language generated from STM32CubeMX with
C++ library ?
Any examples ?
Thanks =)
‎2019-06-30 01:37 AM
Usually C++ code is put in separate *.cpp/*.hpp files. Add those files to the project and call their functions from C code.
‎2019-06-30 02:20 AM
I did that, but I can't compile with .cpp after I put --cpp on my compiler, it gave me a lot of errors, I use Keil for compiling.
What should I change to make it compatible between C and C++?
‎2019-06-30 06:26 AM
> it gave me a lot of errors
Which errors? No need to use --cpp, Keil's compiler will detect c++ file by .cpp extension.,
By the way, which Keil compiler are you using: V5 (armcc) or V6 (clang-like) ?
-- pa
‎2019-06-30 06:38 AM
I use uVision V5.26.2.0