Search code examples
socketsarduinocoap

Cant use Micro-Coap library for arduino


I am trying to get the micro-coap librarby (https://github.com/1248/microcoap) to work on my arduino. When I try to compile it in the Arduino IDE, it reports that <sys/socket.h> dependency in main-posix.c can not be found.

Searches for the problem were not helpful, except for some general C++ answer that was hinting that there is no sys/socket.h on Windows. But this should not have anything to do with Arduino right?

I looked at the ethernet library for arduino and there is a socket.h but it is not in a sys directory.

Hope you can help


Solution

  • Someone suggested simply taking the file out of the arduino path / deleting it and that worked. As Stefan posted in his answer, it is used to build the library on unix/linux and has no relevance for arduino.