fatal error: coapserver.h: No such file or directory

I was trying to use CoAP to retrieve data from dht11 using esp8266 but I received this small annoying error-fatal error: coapserver.h: No such file or directory.
Details are:
Arduino: 1.8.5 (Windows 8.1), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, All Flash Contents, 115200"

C:\Users\labpc 7\Documents\Arduino\coap-server\coap-server.ino:6:24: fatal error: coapserver.h: No such file or directory

#include <coapserver.h>

^

compilation terminated.

Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\labpc 7\Documents\Arduino\libraries\ESP8266WiFi
Not used: C:\Users\labpc 7\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Even after copy-pasting coapserver.h in C:\Users\labpc 7\Documents\Arduino\coap-server and in C:\Users\labpc 7\Documents\Arduino\libraries\ESP8266WiFi still I am receiving the same error :fatal error: coapserver.h: No such file or directory. I am using the github code:
/*
ESP-COAP Server
*/

#include <ESP8266WiFi.h>
#include <coapserver.h>

// CoAP server endpoint url callback
void callback_light(coapPacket &packet, IPAddress ip, int port, int obs);

coapServer coap;

//WiFi connection info
const char* ssid = "xxxxxxxxx";
const char* password = "xxxxxxxxx";

// LED STATE
bool LEDSTATE;

// CoAP server endpoint URL
void callback_light(coapPacket *packet, IPAddress ip, int port,int obs) {
Serial.println("light");

// send response
char p[packet->payloadlen + 1];
memcpy(p, packet->payload, packet->payloadlen);
p[packet->payloadlen] = NULL;
Serial.println(p);

String message(p);

if (message.equals("0"))
{
digitalWrite(16,LOW);
Serial.println("if loop");
}
else if (message.equals("1"))
{
digitalWrite(16,HIGH);
Serial.println("else loop");
}
char *light = (digitalRead(16) > 0)? ((char *) "1") :((char *) "0");

//coap.sendResponse(packet, ip, port, light);
if(obs==1)
coap.sendResponse(light);
else
coap.sendResponse(ip,port,light);

}

void callback_lightled(coapPacket *packet, IPAddress ip, int port,int obs) {
Serial.println("Lightled");

// send response
char p[packet->payloadlen + 1];
memcpy(p, packet->payload, packet->payloadlen);
p[packet->payloadlen] = NULL;

String message(p);

if (message.equals("0"))
LEDSTATE = false;
else if (message.equals("1"))
LEDSTATE = true;

if (LEDSTATE) {
digitalWrite(5, HIGH) ;
if(obs==1)
coap.sendResponse("1");
else
coap.sendResponse(ip, port, "1");

//coap.sendResponse("1");
} else {
digitalWrite(5, LOW) ;
if (obs==1)
coap.sendResponse("0");
else
coap.sendResponse(ip, port, "0");
//coap.sendResponse("0");
}
}

void setup() {
yield();
//serial begin
Serial.begin(115200);

WiFi.begin(ssid, password);
Serial.println(" ");

// Connect to WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
//delay(500);
yield();
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
// Print the IP address
Serial.println(WiFi.localIP());

// LED State
pinMode(16, OUTPUT);
digitalWrite(16, HIGH);
LEDSTATE = true;

pinMode(5, OUTPUT);
digitalWrite(5, HIGH);
//LEDSTATE = true;

// add server url endpoints.
// can add multiple endpoint urls.

coap.server(callback_light, "light");
coap.server(callback_lightled, "lightled");
// coap.server(callback_text,"text");

// start coap server/client
coap.start();
// coap.start(5683);
}

void loop() {
coap.loop();
delay(1000);

}
Can anyone help me?

shivkadari:
Even after copy-pasting coapserver.h in C:\Users\labpc 7\Documents\Arduino\coap-server

The #include directive syntax:

#include <coapserver.h>

is wrong for that usage. The angle braces syntax causes only standard libraries folders to be searched for the file. If you change it to this:

#include "coapserver.h"

then the local folder will first be searched, followed by the library folders if it's not found there.

However, it's better to not just smash around trying to find some messy hack workaround for this problem. You found some code somewhere. Presumably that code worked for the author the way it was written. You found this file coapserver.h somewhere. Frequently the same place you find code will also have some documentation on how to use that code. All that is merely theoretical to the rest of us because you didn't bother to post a link to where you found this code.

shivkadari:
and in C:\Users\labpc 7\Documents\Arduino\libraries\ESP8266WiFi

Certainly not a reasonable solution.

shivkadari:
Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\labpc 7\Documents\Arduino\libraries\ESP8266WiFi
Not used: C:\Users\labpc 7\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi

I can't think of a good reason you would need to install your own copy of the ESP8266WiFi library, instead of just using the one bundled with the ESP8266 core.

Thank you very much "pert". Replacing "<>" with "" solved my problem.