-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receive the following errors when trying to include #19
Comments
Same error over here. HTTPRequest.hpp: In member function 'http::Response http::Request::send(const string&, const string&, const std::vector<std::__cxx11::basic_string<char> >&)':
HTTPRequest.hpp:398:72: error: 'getaddrinfo' was not declared in this scope
if (getaddrinfo(domain.c_str(), port.c_str(), &hints, &info) != 0)
^
HTTPRequest.hpp:401:49: error: 'freeaddrinfo' was not declared in this scope
std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo(info, freeaddrinfo);
^~~~~~~~~~~~
HTTPRequest.hpp:401:62: error: template argument 2 is invalid
std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo(info, freeaddrinfo);
^
HTTPRequest.hpp:401:94: error: expression list treated as compound expression in initializer [-fpermissive]
std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo(info, freeaddrinfo);
^
HTTPRequest.hpp:406:46: error: base operand of '->' is not a pointer
if (::connect(socket, addressInfo->ai_addr, static_cast<socklen_t>(addressInfo->ai_addrlen)) < 0)
^~
HTTPRequest.hpp:406:91: error: base operand of '->' is not a pointer
if (::connect(socket, addressInfo->ai_addr, static_cast<socklen_t>(addressInfo->ai_addrlen)) < 0)
^~ |
What compiler/OS/WindowsSDK/C++ version you use? |
@elnormous I'm using GCC, C++11. |
I can not reproduce this with any version of gcc. What version of gcc are you using? What operating system? |
GCC version 6.3.0, Operating System Windows. |
Are you using cygwin on mingw? |
Ok, this is a problem with MinGW. Fixed it in 14b3beb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HTTPRequest.hpp: In member function 'http::Response http::Request::send(const string&, const string&, const std::vector<std::__cxx11::basic_string >&)':
HTTPRequest.hpp:398:72: error: 'getaddrinfo' was not declared in this scope
if (getaddrinfo(domain.c_str(), port.c_str(), &hints, &info) != 0)
^
HTTPRequest.hpp:401:49: error: 'freeaddrinfo' was not declared in this scope
std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo(info, freeaddrinfo);
^~~~~~~~~~~~
HTTPRequest.hpp:401:62: error: template argument 2 is invalid
std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo(info, freeaddrinfo);
^
HTTPRequest.hpp:401:94: error: expression list treated as compound expression in initializer [-fpermissive]
std::unique_ptr<addrinfo, decltype(&freeaddrinfo)> addressInfo(info, freeaddrinfo);
^
HTTPRequest.hpp:406:46: error: base operand of '->' is not a pointer
if (::connect(socket, addressInfo->ai_addr, static_cast<socklen_t>(addressInfo->ai_addrlen)) < 0)
^~
HTTPRequest.hpp:406:91: error: base operand of '->' is not a pointer
if (::connect(socket, addressInfo->ai_addr, static_cast<socklen_t>(addressInfo->ai_addrlen)) < 0)
The text was updated successfully, but these errors were encountered: