I’m using the ethercard.h library (https://github.com/jcw/ethercard) - in the library there is a file called dhcp.cpp with:
static char hostname = "Arduino-00";
I would like to move this variable to my main program so that it makes it easier changing the value with each project where I use the ethercard library.
I tried uncommenting the line in the ethercard.cpp and adding it to my main sketch however it does not work (I thought it might not be that simple)
\dhcp.cpp:184: error: ‘hostname’ was not declared in this scope
Any ideas? I’ve also tried using this in my main sketch
extern char hostname = "Arduino-00";
But no go. I think I"m on the right track (hopefully), but not quite there.