2017-10-19 10:01 AM
Hello
CubeMX 4.22.1
Cube for L1 1.8
CubeMx generates this kind of code in every initialization file like, for example 'adc.h'
#ifndef __adc_H
#define __adc_H#ifdef __cplusplusextern 'C' {#endif< snip>
extern void _Error_Handler(char*, int);
< snip>
#ifdef __cplusplus
}#endif#endif /*__ adc_H */while in main.h
void _Error_Handler(char*, int);
is not surrounded by '#ifdef __cpluplus ....'
which leads to:
error: conflicting declaration of 'void _Error_Handler(char*, int)' with 'C' linkage
shouldn't it be surounded by '#ifdef cplusplus'?
Thanks
Julien
2017-10-24 08:13 AM
Hello
Devillers.Julien
,First I thank you for your feedback and correction proposal.
You are absolutely right.
This has been discussed in the following thread:
https://community.st.com/0D50X00009XkXpXSAV
The patch, which is exactly what you proposed, has been integrated in Cube4.
Its availability will be no later than early Nov.
Kind regards
Sirma