declarations in libraries

For those trying to avoid the pain of what I just went through here is what I found:

PaulS:
Please explain why those are global variables (that is why they are created twice), rather than class fields.

You could define the variables in the sketch, and add extern in front of the declaration statements in the header. That way, the header file would simply affirm that the variables are defined somewhere else, and would allow access to them, wherever they are defined.

I didn't necessarily want them to be global variables. After seeing that comment I took another look at the library tutorial and noticed that I should be declaring the variables below with the private declarations for the class:

#ifndef eth_h
#define eth_h

#include <SPI.h>
#include <Ethernet.h>
#include "Arduino.h"
  
class Eth{

public:
void init();

private:
byte mac[5];
};
#endif