Let the laughs begin!(at least I told you)
Machine: Asus win10 ryzen 5800x w/ virtualization on
errors:
[7/5/2022, 9:51:02 PM] For C source files, IntelliSenseMode was changed from "windows-gcc-arm64" to "windows-gcc-x64" based on compiler args and querying compilerPath: "C:\msys64\mingw64\bin\gcc.exe"
[7/5/2022, 9:51:02 PM] IntelliSenseMode was changed because it didn't match the detected compiler. Consider setting "compilerPath" instead. Set "compilerPath" to "" to disable detection of system includes and defines.
[7/5/2022, 9:51:02 PM] For C++ source files, IntelliSenseMode was changed from "windows-gcc-arm64" to "windows-gcc-x64" based on compiler args and querying compilerPath: "C:\msys64\mingw64\bin\gcc.exe"
[7/5/2022, 9:51:02 PM] IntelliSenseMode was changed because it didn't match the detected compiler. Consider setting "compilerPath" instead. Set "compilerPath" to "" to disable detection of system includes and defines.
Compile CMD win10: g++ .\http_example.cpp -o http_example // note in pwd
Code taken for web:
How to send http request and retrieve a json response C++ Boost
#include <boost/asio.hpp>
#include <iostream>
int main() {
boost::system::error_code ec;
using namespace boost::asio;
// what we need
io_service svc;
ip::tcp::socket sock(svc);
sock.connect({ {}, 8087 }); // http://localhost:8087 for testing
// send request
std::string request("GET /newGame?name=david HTTP/1.1\r\n\r\n");
sock.send(buffer(request));
// read response
std::string response;
do {
char buf[1024];
size_t bytes_transferred = sock.receive(buffer(buf), {}, ec);
if (!ec) response.append(buf, buf + bytes_transferred);
} while (!ec);
// print and exit
std::cout << "Response received: '" << response << "'\n";
}
Installed mingw-w64-x86_64-boost using: MYSY2 MYSY; pacman -S mingw-w64-x86_64-boost
Any Suggestions on the issue/error?