cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIde and Error according extern"C"

stefluik
Visitor

I changed an example program for STM32F4 Discovery Board to C++ project.

When compiling the project, there are files included from BSP, which includes a definition:

extern "C".

When compiling the project, the first error is the following:

../../Drivers/BSP/STM32F4-Discovery/stm32f4_discovery.h:25:9: error: expected unqualified-id before string constant

25 | extern "C" {

| ^~~

what is the problem?

Thanks for responsing

1 REPLY 1

Any effort to prevent repeated inclusion of the same include file?

Closing brace matching?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..