mendsley / tinyhttp

Minimal HTTP processing library
Other
149 stars 45 forks source link

Close Errors #5

Closed DeadlyOS closed 8 years ago

DeadlyOS commented 8 years ago
C:\dvn\dev\tinyhttp>g++ -o example example.cpp
example.cpp: In function 'int connectsocket(const char*, int)':
example.cpp:89:16: error: 'close' was not declared in this scope
         close(s);
                ^
example.cpp: In function 'int main()':
example.cpp:141:19: error: 'close' was not declared in this scope
         close(conn);
                   ^
example.cpp:159:23: error: 'close' was not declared in this scope
             close(conn);
                       ^
example.cpp:174:19: error: 'close' was not declared in this scope
         close(conn);
                   ^
example.cpp:179:15: error: 'close' was not declared in this scope
     close(conn);
               ^

Off hand I can't see anything wrong here. I haven't altered the code at all either.

mdeaconu commented 8 years ago

It looks that you have not compiled firstly the .c files in order to generate the object files. ReadMe file contains the right command to compile and to build the example.cpp file.

DeadlyOS commented 8 years ago

Yeah. Noticed that now. My mistake!