0

I am unable to use microcoap library (https://github.com/1248/microcoap) in Arduino IDE. When I try to compile it produces following error

main-posix.c:1:24: fatal error: sys/socket.h: No such file or directory
#include <sys/socket.h>
                      ^

This question has already been answered in (Cant use Micro-Coap library for arduino) but the answer doesn't make sense.

Community
  • 1
  • 1
Fahad Siddiqui
  • 1,829
  • 1
  • 19
  • 41
  • 1
    Try to find the path where `socket.h` is, if it isn't there? Or make sure the compiler knows the path, since `sys/socket.h` isn't a full path. – Weather Vane Oct 19 '15 at 20:09

1 Answers1

1

Delete that main-posix.c because this is necessary for linux, not Arduino. It will definitely work.

ninja.stop
  • 410
  • 1
  • 10
  • 24