Odd local and CLI compile errors

The only remarkable thing I see is in httpclient.cpp and example.cpp. The httpmsg String is extern’ed in httpclient.cpp (not .h) but declared as a file scope String var in example.cpp which includes httpclient.h.

Doesn’t this create a compile order dependent declaration for this var?

in which case it could trigger based on how many cores are being used to build or if ccache is enabled etc.

@sej7278, @bko and @BDub, I had to do a clean make for it to compile successfully.

Can you try moving the

extern String httpmsg;

from httpclient.cpp to httpclient.h and build dirty again?

@bko, I have to apologize. It seems that I was not using the latest version of the HTTPClient library which does not have that extern. However, even with the new library, the code still compiles fine locally but not with CLI.

1 Like

And still the same error?
undefined reference to 'String::operator=(String&&)'

@bko sorry! Yes same errors.

building off of latest master for all, and pulled again with no updates. That said, ideally it should have compiled without needing to build clean, so I'm guessing there is some issue with the String library object and how it links with fresh sources.

1 Like