Description
Hi,
I have a compilation error on my Arduino Due:
C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master\dhcp.cpp: In static member function 'static bool EtherCard::dhcpSetup(const char*, bool)': C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master\dhcp.cpp:327:61: error: 'strncpy_P' was not declared in this scope strncpy_P(hostname, hname, DHCP_HOSTNAME_MAX_LEN); ^ Error compiling.
there is no other code in my sketch, just the library include:
#include <EtherCard.h>
void setup() {
}
void loop() {
}
I'm getting more compile errors, whe trying to add the EtherCard libarary from Arduino IDE (using all 3 header files):
#include <enc28j60.h>
#include <EtherCard.h>
#include <net.h>
void setup() {
}
void loop() {
}
C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:41:12: error: 'uint8_t' does not name a type static uint8_t buffer[]; //!< Data buffer (shared by recieve and transmit) ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:42:12: error: 'uint16_t' does not name a type static uint16_t bufferSize; //!< Size of data buffer ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:46:12: error: 'uint8_t' does not name a type static uint8_t* tcpOffset () { return buffer + 0x36; } //!< Pointer to the start of TCP payload ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:59:12: error: 'uint8_t' does not name a type static uint8_t initialize (const uint16_t size, const uint8_t* macaddr, ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:71:29: error: 'uint16_t' has not been declared static void packetSend (uint16_t len); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:77:12: error: 'uint16_t' does not name a type static uint16_t packetReceive (); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:83:26: error: 'uint8_t' has not been declared static void copyout (uint8_t page, const uint8_t* data); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:83:46: error: 'uint8_t' does not name a type static void copyout (uint8_t page, const uint8_t* data); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:83:55: error: ISO C++ forbids declaration of 'data' with no type [-fpermissive] static void copyout (uint8_t page, const uint8_t* data); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:89:25: error: 'uint8_t' has not been declared static void copyin (uint8_t page, uint8_t* data); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:89:39: error: 'uint8_t' has not been declared static void copyin (uint8_t page, uint8_t* data); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:96:12: error: 'uint8_t' does not name a type static uint8_t peekin (uint8_t page, uint8_t off); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:147:12: error: 'uint8_t' does not name a type static uint8_t doBIST(uint8_t csPin = 8); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:156:12: error: 'uint16_t' does not name a type static uint16_t readPacketSlice(char* dest, int16_t maxlength, int16_t packetOffset); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:164:12: error: 'uint16_t' does not name a type static uint16_t enc_malloc(uint16_t size); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:169:12: error: 'uint16_t' does not name a type static uint16_t enc_freemem(); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:177:31: error: 'uint16_t' has not been declared static void memcpy_to_enc(uint16_t dest, void* source, int16_t num); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:177:60: error: 'int16_t' has not been declared static void memcpy_to_enc(uint16_t dest, void* source, int16_t num); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:184:45: error: 'uint16_t' has not been declared static void memcpy_from_enc(void* dest, uint16_t source, int16_t num); ^ C:\Users\Jacek\Documents\Arduino\libraries\ethercard-master/enc28j60.h:184:62: error: 'int16_t' has not been declared static void memcpy_from_enc(void* dest, uint16_t source, int16_t num); ^ Error compiling.
What I'm doing wrong?
Thanks for help
Jack