Strange issue with multiple definitions of CA_ROOT_CERTIFICATE

Has anyone come across compile errors when including the ThingESP8266.h header in multiple places?

I am getting multiple definitions of CA_ROOT_CERTIFICATE which I would have thought would have been avoided by precompiler logic in ThingClient.h :

#ifndef THINGER_SERVER
#define THINGER_SERVER "iot.thinger.io"
// CA root certificate from community servers
// USERTrust RSA - Valid to January 18, 2038
auto CA_ROOT_CERTIFICATE = R"(-----BEGIN CERTIFICATE-----
...

… Although, my precompiler knowledge is a bit rusty :wink:

Any ideas?

I just realized what’s happening… CA_ROOT_CERTIFICATE is being defined as a global variable in ThingerClient.h which is causing the multiple definitions. Any chance the CA_ROOT_CERTIFICATE could be defined in a different way, rather than using a global variable… please :slight_smile: