Well i am using eclipse as shown on the subject. I bought an ethernet shield. i tried some examples to check how it is working on the Arduino Ide and there was no problem. I made a new project at Eclipse and i copied all the libraries from the Ethernet example in the folder that i keep my libraries in each project. I included the w5100 and the util libraries and all inside the utilities folder so there is no problem with finding the .h files.
It is not the first project i have others that work without problems and there are identical.The only difference is that the Ethernet Shield libs does not “work”.
Build has no problem but i think linker has. When i try to open any .cpp file of the libraries (almost everything) i get these errors many times:
- for Dhcp.cpp:
Description Resource Path Location Type
Invalid arguments ’
Candidates are:
int read()
int read(unsigned char *, unsigned int)
int read(char *, unsigned int)
’ Dhcp.cpp /EthernetShield/lib line 269 Semantic Error
and the line on the code is
_dhcpUdpSocket.read((uint8_t*)&fixedMsg, sizeof(RIP_MSG_FIXED));
2)For Dns.cpp i get
Description Resource Path Location Type
Invalid arguments ’
Candidates are:
int read()
int read(unsigned char *, unsigned int)
int read(char *, unsigned int)
’ Dns.cpp /EthernetShield/lib line 382 Semantic Error
the code is :
iUdp.read((uint8_t*)&answerType, sizeof(answerType));
- for EthernetUdp.cpp i get:
Description Resource Path Location Type
Invalid arguments ’
Candidates are:
int recv(unsigned int, unsigned int *, int)
’ EthernetUdp.cpp /EthernetShield/lib line 173 Semantic Error
the code is:
got = recv(_sock, buffer, _remaining);
The problems are many and all the same type for each lib at the same functions each time.i just gave you one for each lib.
And final
4) for Ethernet.cpp i get
Description Resource Path Location Type
Symbol ‘NULL’ could not be resolved Ethernet.cpp /EthernetShield/lib line 72 Semantic Error
code is :
if(_dhcp != NULL){
//we have a pointer to dhcp, use it
rc = _dhcp->checkLease();
switch ( rc ){
case DHCP_CHECK_NONE:
//nothing done
break;
case DHCP_CHECK_RENEW_OK:
case DHCP_CHECK_REBIND_OK:
//we might have got a new IP.
W5100.setIPAddress(_dhcp->getLocalIp().raw_address());
W5100.setGatewayIp(_dhcp->getGatewayIp().raw_address());
W5100.setSubnetMask(_dhcp->getSubnetMask().raw_address());
_dnsServerAddress = _dhcp->getDnsServerIp();
break;
default:
//this is actually a error, it will retry though
break;
}
}
return rc;
}