This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MQTTClient.h vs stm32f7xx.h

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

Parents Reply Children
No data