So here is the code:
Sketch:
#include <SPI.h>
#include <Ethernet.h>
#include "eth.h"
Eth eth();
void setup(){
}
void loop(){
}
eth.h:
#ifndef Eth_h
#define Eth_h
#include <SPI.h>
#include <Ethernet.h>
#include "Arduino.h"
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1, 177);
EthernetServer server(80);
class Eth{
public:
void init();
};
#endif
and eth.cpp:
#include "Arduino.h"
#include "eth.h"
void Eth::init(){
}
With the variables declared I get these errors:
eth.cpp.o:eth.cpp:14: multiple definition of `ip'
consRemoteTwo.cpp.o:consRemoteTwo.cpp:11: first defined here
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld: Disabling relaxation: it will not work with multiple definitions
eth.cpp.o:eth.cpp:14: multiple definition of `server'
consRemoteTwo.cpp.o:consRemoteTwo.cpp:11: first defined here
eth.cpp.o:(.data.mac+0x0): multiple definition of `mac'
consRemoteTwo.cpp.o:(.data.mac+0x0): first defined here
Any suggestions on what I'm still doing wrong?
Thanks again,
Loren