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.
Hi,
I am currently playing about with MQTT using the MDK-Packs::Paho_MQTT pack in MDK-ARM. However, when I try and include the stm32f7xx.h file in my MQTT thread I get an error:
Arm\Packs\Keil\STM32F7xx_DFP\2.13.0\Drivers\CMSIS\Device\ST\STM32F7xx\Include\stm32f7xx.h(171): error: #101: "SUCCESS" has already been declared in the current scope
which is because it is declared here:
typedef enum { SUCCESS = 0U, ERROR = !SUCCESS } ErrorStatus;
in stm32f7xx.h, and here:
/* all failure return codes must be negative */ enum returnCode { BUFFER_OVERFLOW = -2, FAILURE = -1, SUCCESS = 0 };
in MQTTClient.h.
This currently means that I can't include both files. My question is, is there a way to override this (or otherwise fix this) without editing the two header files (as they are "locked" for editing by MDK-ARM).
Regards,
Alex
Thanks for the information. I've fiddled with the MQTTClient code to use names prefixes within that enum (as it was the easiest target and didn't require huge amounts of modifications).
Cheers,