Wont compile
BenS12362 opened this issue · 1 comments
just tells me this:
../include/HTTPRequest.hpp: In member function 'http::Response http::Request::send(const string&, const std::vector&, const std::vector<std::basic_string >&, std::chrono::milliseconds)':
../include/HTTPRequest.hpp:537:13: error: 'addrinfo' was not declared in this scope
537 | addrinfo hints = {};
| ^~~~~~~~
../include/HTTPRequest.hpp:538:13: error: 'hints' was not declared in this scope; did you mean 'int'?
538 | hints.ai_family = getAddressFamily(internetProtocol);
| ^~~~~
| int
../include/HTTPRequest.hpp:541:23: error: 'info' was not declared in this scope
541 | addrinfo* info;
| ^~~~
../include/HTTPRequest.hpp:542:17: error: 'getaddrinfo' was not declared in this scope
542 | if (getaddrinfo(domain.c_str(), port.c_str(), &hints, &info) != 0)
| ^~~~~~~~~~~
../include/HTTPRequest.hpp:545:55: error: 'freeaddrinfo' was not declared in this scope
545 | const std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo{info, freeaddrinfo};
| ^~~~~~~~~~~~
../include/HTTPRequest.hpp:545:68: error: template argument 2 is invalid
545 | const std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo{info, freeaddrinfo};
| ^
../include/HTTPRequest.hpp:545:70: error: scalar object 'addressInfo' requires one element in initializer
545 | const std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo{info, freeaddrinfo};
| ^~~~~~~~~~~
../include/HTTPRequest.hpp:586:17: warning: declaration of 'headers' shadows a parameter [-Wshadow]
586 | headers,
| ^~~~~~~
../include/HTTPRequest.hpp:529:55: note: shadowed declaration is here
529 | const std::vectorstd::string& headers,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../include/HTTPRequest.hpp:587:17: warning: declaration of 'body' shadows a parameter [-Wshadow]
587 | body
| ^~~~
../include/HTTPRequest.hpp:528:51: note: shadowed declaration is here
528 | const std::vector<uint8_t>& body,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
make: *** [Makefile:37: main.o] Error 1
i tried including the libs it just makes more errors