mattdh666 / rpi-http-request

Raspberry Pi Library for Handling HTTP Requests
MIT License
7 stars 7 forks source link

Help me.. compile error #1

Open DongikKim opened 8 years ago

DongikKim commented 8 years ago

pi@raspberrypi:~ $ git clone https://github.com/mattdh666/rpi-http-request.git Cloning into 'rpi-http-request'... remote: Counting objects: 30, done. remote: Total 30 (delta 0), reused 0 (delta 0), pack-reused 30 Unpacking objects: 100% (30/30), done. Checking connectivity... done. pi@raspberrypi:~ $ ls bluetooth Downloads node_modules Pictures rpi-http-request Templates Desktop gpio-admin node-v4.4.1-linux-armv7l Public SmartLet Videos Documents Music node-v4.4.1-linux-armv7l.tar.xz python_games srv wiringPi pi@raspberrypi:~ $ cd rpi-http-request/ pi@raspberrypi:~/rpi-http-request $ ls demo HttpException.h HttpRequest.h HttpResponse.h makefile HttpException.cpp HttpRequest.cpp HttpResponse.cpp LICENSE README.md pi@raspberrypi:~/rpi-http-request $ make g++ -fPIC -Wall -O3 -g -c -o HttpRequest.o HttpRequest.cpp HttpRequest.cpp: In member function ??void HttpRequest::cleanUp()??: HttpRequest.cpp:231:5: error: ??::close?? has not been declared ::close(_socket); ^

: recipe for target 'HttpRequest.o' failed make: **\* [HttpRequest.o] Error 1
trafficja commented 7 years ago

Add this header file in the HttpRequest.cpp file : #include <unistd.h> and it will compile properly.