Comments (7)
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)
^~
from httprequest.
What compiler/OS/WindowsSDK/C++ version you use?
from httprequest.
@elnormous I'm using GCC, C++11.
from httprequest.
I can not reproduce this with any version of gcc. What version of gcc are you using? What operating system?
from httprequest.
GCC version 6.3.0, Operating System Windows.
Compiled : g++ main.cpp
from httprequest.
Are you using cygwin on mingw?
from httprequest.
Ok, this is a problem with MinGW. Fixed it in 14b3beb
from httprequest.
Related Issues (20)
- Too many errors HOT 1
- send Variable GET Request
- Json post bug
- Errors when including HOT 2
- Numerous "unresolved external symbol" Errors when running HOT 3
- basic_string::_M_create HOT 2
- Empty output HOT 1
- Authentication error
- Using https HOT 2
- An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was ful
- Cant download a file?
- What is the reason for handling interrupted system calls (EINTR) throughout the code?
- A 204 response results in timeouts if connection is kept-alive...
- Failed when compile with MSVC HOT 1
- Inconsistent use of 'uri' and 'url' in example/main.cpp
- Errors when including single-header file
- Post requests don't work.
- Using header in request for authentification
- A couple of ideas HOT 1
- A fix for receive response
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httprequest.