#Sending HTTP request using ASIO in c++
365 messages ยท Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
it'll be easier to help if you tell us what your question or issue is
There is no issue, I simply lack some knowledge. I was under the impression that the tittle was self explanatory. However, I will take the liberty to redefine my thread's context. I want to send a HTTP request using the library ASIO in C++. I want to be able to send HTTP/HTTPS request with more than one method (get, post, put, delete, etc...) and with a body and headers.
@bronze relic
asio is primarily concerned with sockets, if you don't want to invent HTTP from scratch, boost.beast uses ASIO and has HTTP client code you can use
Is there any way you could guide me through install boost.beast and getting it to function as intended?
oof ๐
use vcpkg or something to install boost
or use your favorite system package manager
thats the problem I have no idea how
what have you tried so far?
Nothing, like I said I have no idea how to install a lib and get it working
have you tried googling it?
I did, I got info about smth called choco, pacman, apt, cmake, and more
but I am still super confused
you can try something like "how to install boost.beast on windows"
what compiler/build system/IDE are you using might also make a difference
or checking the github of the lib is already a good idea https://github.com/boostorg/beast?tab=readme-ov-file#building-tests-and-examples
im using G++ from Mingw msys2
on windows 10
alright, then you have a package manager already (msys2's pacman)
which should be able to install the entire precompiled boost library suite
I just installed the raw zip
what
how?
that's not msys2 then 
so how do I install it with pacman and such
following the instructions here:
https://www.msys2.org/https://www.msys2.org/
will get you a GCC compiler
you can then also search for boost pacman -Ss boost and install it as well
I already have the gcc and g++ comp
but if you don't have msys2 then you don't have a package manager
so that doesn't help you
I have msys2
$ pacman -Ss boost
clangarm64/mingw-w64-clang-aarch64-boost 1.84.0-1
Free peer-reviewed portable C++ source libraries (mingw-w64)
mingw32/mingw-w64-i686-boost 1.84.0-1
Free peer-reviewed portable C++ source libraries (mingw-w64)
mingw64/mingw-w64-x86_64-boost 1.84.0-1
Free peer-reviewed portable C++ source libraries (mingw-w64)
ucrt64/mingw-w64-ucrt-x86_64-boost 1.84.0-1
Free peer-reviewed portable C++ source libraries (mingw-w64)
clang32/mingw-w64-clang-i686-boost 1.84.0-1
Free peer-reviewed portable C++ source libraries (mingw-w64)
clang64/mingw-w64-clang-x86_64-boost 1.84.0-1
Free peer-reviewed portable C++ source libraries (mingw-w64)
no idea how you installed it then but w/e
pick the same prefix as you did for your GCC
probably the ucrt64 or mingw64 one
how do I install it
pacman -S <name>
like pacman install mingw-w64-ucrt-x86_64-boost?
?
i think it worked
im not sure tho
and I am not sure how to include it
take one of the examples like
https://www.boost.org/doc/libs/1_87_0/libs/beast/doc/html/beast/quick_start/http_client.html
#includes should just work, since it was installed to ucrt64/include where your ucrt64/bin/g++ will already look
you may need to link some libraries to get it to link, but headers should be found without doing anything else
PS C:\coding-projects\CPP-Dev\SQS> g++ src/entry_file.cpp src/snbp.cpp -o build/SQS-Alpha-Build-0060 -lws2_32 -lcrypto -lssl
src/entry_file.cpp:11:10: fatal error: boost/http_client.hpp: No such file or directory
11 | #include <boost/http_client.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
PS C:\coding-projects\CPP-Dev\SQS> ```
which g++ is this?
CommandType Name Version Source
----------- ---- ------- ------
Application g++.exe 0.0.0.0 C:\msys64\ucrt64\bin\g++.exe
PS C:\coding-projects\CPP-Dev\SQS> ```
PS C:\coding-projects\CPP-Dev\SQS> g++ --version
g++.exe (Rev3, Built by MSYS2 project) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
PS C:\coding-projects\CPP-Dev\SQS>
where did you get boost/http_client.hpp from
look at the example that shows you how to use the library ๐
can you just please tell me the prefix
there's a whole example you can copy paste
welp im a dum dum
are you using Windows Subsystem for Linux (WSL)?
no
THEN HOW THE FUCK DID YOU INSTALL A PACKAGE WITH PACMAN WHEN YOU'RE ON WINDOWS
msys2 installs a little linux-like environment with pacman, bash, etc.
@pure elbow
'_snwprintf_instead_use_StringCbPrintfW_or_StringCchPrintfW' was not declared in this scope
PS C:\coding-projects\CPP-Dev\SQS> g++ src/entry_file.cpp src/snbp.cpp -o build/SQS-Alpha-Build-0061 -lws2_32 -lcrypto -lssl -std=c++20
In file included from C:/coding-projects/CPP-Dev/bassil/src/headers/SNBP.h:16,
from src/snbp.hpp:22,
from src/entry_file.cpp:13:
C:/msys64/ucrt64/include/boost/asio/detail/impl/win_static_mutex.ipp: In member function 'int boost::asio::detail::win_static_mutex::do_init()':
C:/msys64/ucrt64/include/boost/asio/detail/impl/win_static_mutex.ipp:48: error: '_snwprintf_instead_use_StringCbPrintfW_or_StringCchPrintfW' was not declared in this scope
48 | _snwprintf(
|
C:/msys64/ucrt64/include/boost/static_string/static_string.hpp: In function 'boost::static_strings::static_wstring<N> boost::static_strings::detail::to_static_wstring_float_impl(double)':
C:/msys64/ucrt64/include/boost/static_string/static_string.hpp:660: error: 'swprintf_instead_use_StringCbPrintfW_or_StringCchPrintfW' is not a member of 'std'
660 | std::swprintf(buffer, N + 1, L"%f", value);
|
C:/msys64/ucrt64/include/boost/static_string/static_string.hpp:672: error: 'swprintf_instead_use_StringCbPrintfW_or_StringCchPrintfW' is not a member of 'std'
672 | std::swprintf(buffer, N + 1, L"%.*e", precision, value);
|
C:/msys64/ucrt64/include/boost/static_string/static_string.hpp: In function 'boost::static_strings::static_wstring<N> boost::static_strings::detail::to_static_wstring_float_impl(long double)':
C:/msys64/ucrt64/include/boost/static_string/static_string.hpp:697: error: 'swprintf_instead_use_StringCbPrintfW_or_StringCchPrintfW' is not a member of 'std'
697 | std::swprintf(buffer, N + 1, L"%Lf", value);
|
C:/msys64/ucrt64/include/boost/static_string/static_string.hpp:709: error: 'swprintf_instead_use_StringCbPrintfW_or_StringCchPrintfW' is not a member of 'std'
709 | std::swprintf(buffer, N + 1, L"%.*Le", precision, value);
|
PS C:\coding-projects\CPP-Dev\SQS>
try adding -DSTRSAFE_NO_DEPRECATE to your compiler flags
same error
๐คท
I'm at work and I don't know how to fix it
you'd have to read the code that is blowing up and figure out why
and then find out how to convince it not to
it looks like the code is calling _snwprintf and the standard library is being funny and doing something like
#define _snwprintf(...) _snwprintf_instead_use_StringCbPrintfW_or_StringCchPrintfW()
to let you know this function is crappy and you should use another one
find out where it's doing that and see if that crap is guarded by some #ifdefs
see if you can define something to make it not do this
im a total noob
BUT I FIXED IT
๐
I needed to change a file from the boost lib and replace _snwprintf with StringCbPrintfW
well, that's not what I would have done, since now the code will only work on your machine with the modified file, but it works for now 
AND IT SEND THE HTTP REQUEST
*sent

but it not work....
you just said it worked 
it showed a response
but a response from cloudflare saying it could not understand the request
well now im confused why it does not work
well what kind of request did you try sending
maybe try it with a simple site like https://httpbin.org/
e.g. https://httpbin.org/get
send a get request, get back a json payload with info about your request
@pure elbow
Hey there
im trying to get a window to work with like text display and text entry
I dont know of any simple lib to do that
Qt has both UI and networking utilities
sorry for bothering, do you think you can guide me through installing it and includeing it
no but you can find plenty of tutorials online
could you? @pure elbow
you should at least try a bit by yourself
I spent the last week trying to get boost to work bymyself and I could not
it took you guys 1 hour
How do you think we learned ^^
you don't have to wait a whole week before asking for help if you get stuck but you should at least try
installer? sudo?
Download Qt, a development tool containing everything you need for your entire software development life cycle. Install Qt today.
you can install qt libs from msys2's package manager
How?
if you search for qt6 with pacman -Ss qt6 you should find stuff
qt6-base and qt6-tools are probably the minimum you need
all of them have the prefix "mingw"
I mean this bit at the start: clangarm64/
IIRC you have the ucrt64/mingw-w64-ucrt64-x86_64-gcc
so you use that same prefix for all the libs and tools you install
ucrt64/mingw-w64-ucrt-x86_64-qt6-5compat 6.6.1-1 (mingw-w64-ucrt-x86_64-qt6)
so thisone?
mingw-w64-ucrt-x86_64-qt6 is a group that will install all these packages: https://packages.msys2.org/groups/mingw-w64-ucrt-x86_64-qt6
if you don't mind downloading a little extra, sure, that should include everything you could possibly need ๐
now what?
now read the qt docs for getting started with cmake
im not using Cmake
RIP
so now what?
I guess for basic stuff you won't need the MOC
so how do I include it and stuff
just read about some widgets on the qt docs you need
buttons, text input, etc.
but you may need to figure out some include paths to tell the compiler yourself
because Qt is a rather large library that really kinda needs an actual build system to use
well its not finding QApplication
you might have to search around in <msys2 install dir>/ucrt64/include and see where the Qt headers are at
I found this dir C:\msys64\ucrt64\include\qt6
but I cant find anything in that dir called QApplication
maybe its in a sub folder
just search for a file called QApplication
there shouldn't be that many ๐
once you have that you'll probably also have to link some qt libs
the widget one at least
yeah
its giving a internal lib error
PS C:\coding-projects\CPP-Dev\SQS\src> g++ -o terminal_emulator GUI.cpp
In file included from C:/msys64/ucrt64/include/qt6/QtWidgets/QApplication:1,
from GUI.cpp:2:
C:/msys64/ucrt64/include/qt6/QtWidgets/qapplication.h:7:10: fatal error: QtWidgets/qtwidgetsglobal.h: No such file or directory
7 | #include <QtWidgets/qtwidgetsglobal.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
PS C:\coding-projects\CPP-Dev\SQS\src>
you need to add the include path with -I include/qt6
so that those headers can include other headers as <QtWidgets/whatever>
PS C:\coding-projects\CPP-Dev\SQS\src> g++ -o terminal_emulator GUI.cpp -I include/qt6
In file included from C:/msys64/ucrt64/include/qt6/QtWidgets/QApplication:1,
from GUI.cpp:2:
C:/msys64/ucrt64/include/qt6/QtWidgets/qapplication.h:7:10: fatal error: QtWidgets/qtwidgetsglobal.h: No such file or directory
7 | #include <QtWidgets/qtwidgetsglobal.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
PS C:\coding-projects\CPP-Dev\SQS\src> g++ -o terminal_emulator GUI.cpp -Iinclude/qt6
In file included from C:/msys64/ucrt64/include/qt6/QtWidgets/QApplication:1,
from GUI.cpp:2:
C:/msys64/ucrt64/include/qt6/QtWidgets/qapplication.h:7:10: fatal error: QtWidgets/qtwidgetsglobal.h: No such file or directory
7 | #include <QtWidgets/qtwidgetsglobal.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated
add more include paths with -I
Which paths
I am still a bit confused
You said you found where it is
If the #include that's failing specifies <foo/bar.h>, and it's located at whatever/idk/foo/bar.h
Then you need to add -Iwhatever/idk
#include <qt6/QtWidgets/QApplication>
#include <qt6/QtWidgets/QPushButton>
#include <qt6/QtWidgets/QWidget>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget window;
window.setWindowTitle("Qt6 Simple Window");
window.setGeometry(100, 100, 300, 200);
QPushButton button("Click Me", &window);
button.setGeometry(100, 80, 100, 30);
window.show();
return app.exec();
}
PS C:\coding-projects\CPP-Dev\jsh\src> g++ -o terminal_emulator GUI.cpp -lC:/msys64/ucrt64/include
In file included from C:/msys64/ucrt64/include/qt6/QtWidgets/QApplication:1,
from GUI.cpp:2:
irectory
7 | #include <QtWidgets/qtwidgetsglobal.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated
it is saying that it cant find a file within the lib
@pure elbow
yes, read again what I wrote
the lib requires you to make #include <QtWidgets/qtwidgetsglobal.h> work
you made #include <qt6/QtWidgets/QWidget> work
not the same thing
do I include with i or I and do I put a space between the flag and the path or not? @pure elbow
-Idir
so where is this QtGui/qtguiglobal.h
in C:\msys64\ucrt64\include\qt6
then you need to tell your compiler to look there
but I added that and now it gives me
you resolved the compiler errors
now you have linker errors
because you need to link some qt libs I imagine
the one that has the definitions for the stuff you want to use
you're using QApplication or something
The QApplication class manages the GUI application's control flow and main settings.
as you can see here, it's part of the widgets library
because you choose to do this all manually, now you have to find out what that library is called exactly on your system
maybe qt6-widgets
Amazing now I have 20 pages of docs and no clue how to make a window
idk
you chose the hard way
It has a lot of libs
C:\msys64\ucrt64\lib\libQt6Widgets.dll.a
that is the widgets one
how does one link it
it wants ``__imp__Z9qt_assertPKcS0_i'`
I tried to link Qt6Widgets but it didnt do anything
this assert thing is probably in some other qt library shared by many of them
Browse the source of qtbase v6.8.1 using KDAB Codebrowser which provides IDE like features for browsing C, C++, Rust & Dart code in your browser
it's declared here in qtbase
so probably in that library
I guess you could ๐คท
you could also try asking pkg-config for linker flags
Qt6AxBase ?
I don't see an Ax
Well I cant find a Qt6Base.dll
these are the only QT lib files I could find with b
you can ask pacman what files it installed for a given package,
like pacman -Ql mingw-w64-ucrt-x86_64-qt6-base
then check or grep for the libs
what
the order matters, too
AHHH
if Qt6Widgets uses Qt6Core you need to link them in that order
g++ -o terminal_emulator GUI.cpp -IC:\msys64\ucrt64\include\ -IC:\msys64\ucrt64\include\qt6 -LQt6Core -LQt6Widgets -LQt6Assert This is the command im using
don't celebrate too early 
if you try to run it now it will probably complain about missing DLLs, unless you put that whole ucrt64/bin folder on PATH
just be aware if you want anyone else to be able to run it, they need a bunch of those .dll files
and technically there's additional qt plugin DLLs you might also need that need to be in specific places and other files...
there's a windeployqt program that can copy all that stuff for you
hmm
I just want a window
but last issue
I am getting Errors within VSC
its saying random error everywhere but it works
it might not know anything about your mingw installation
so it might not know where to find any headers
and it certainly doesn't know about the include paths you told the compiler about
so if I send the EXE to someone it will not work?
whyyyy.s;s,dglomiejhadxb
or you give them a nice zip with all the required stuff
I regret learning C++
I like the backend stuff
but I dont waant to deal with this shit
Maybe in the future but I think its not for me. I will continue working on the back end stuff and completely ignore the QT stuff
I will work on the project just not the QT stuff I dont like it
lol
Including library in CPP has a steep learning curve, it's definitely not easy. But to be fair you seem to be trying to brute force it without actually learning or understanding what's going on so that's obviously going to make it much harder
Yeah
I want to use CMake it make my life better
however I know im stupid, and I know how much extra effort its going to take to set it up and learn it and change my stuff
I am 13 right now. I have been doing a lot on C++ working with the stack, memory management, a bit of network stuff and more but I think I just wanna do more of that for now
@pure elbow
@pure elbow
I am having another weird issue
I am trying to compile my project and after doing some googling I think I found the issue
but I cant find a solution
the error is 'StringCbPrintfW' was not declared in scope
(why in gods name are you using that
)
I already have strsafe.h included
I am not using that, BOOST IS!!! haha
didn't you edit boost to make it use that? 
These are good docs (I bookmarked them) but it seems like it has no mention of fixing This error
I fixed part of boost (one file) but there are hundreds more
"fixed"
lol
But yeah im not sure how to approach this one. I found a few cases of this online (Sadly not related to boost, but still helpful) and they said to include strsafe.h which im already doing and not defining some NO_USE_StringCbPrintfW
The error also mentions that its later defined in the translation unit
start with the very first error
PS C:\coding-projects\CPP-Dev\jsh> g++ src/entry_file.cpp src/snbp.cpp -o build/SQS-Alpha-Build-0063 -lws2_32 -lcrypto -lssl -std=c++20 -DSTRSAFE_NO_DEPRECATE
In file included from C:/msys64/ucrt64/include/boost/asio/detail/win_event.hpp:25,
from C:/msys64/ucrt64/include/boost/asio/detail/event.hpp:23,
from C:/msys64/ucrt64/include/boost/asio/execution/blocking_adaptation.hpp:19,
from C:/msys64/ucrt64/include/boost/asio/execution.hpp:22,
from C:/msys64/ucrt64/include/boost/asio/system_executor.hpp:20,
from C:/msys64/ucrt64/include/boost/asio/associated_executor.hpp:24,
from C:/msys64/ucrt64/include/boost/beast/core/detail/bind_handler.hpp:17,
from C:/msys64/ucrt64/include/boost/beast/core/bind_handler.hpp:14,
from C:/msys64/ucrt64/include/boost/beast/core/async_base.hpp:14,
from C:/msys64/ucrt64/include/boost/beast/core.hpp:15,
from src/entry_file.cpp:12:
C:/msys64/ucrt64/include/boost/asio/detail/socket_types.hpp:24:2: error: #error WinSock.h has already been included
24 | #error WinSock.h has already been included
| ^~~~~
In file included from C:/msys64/ucrt64/include/boost/asio/detail/socket_types.hpp:33:
C:/msys64/ucrt64/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
15 | #warning Please include winsock2.h before windows.h
lets see your includes in src/entry_file.cpp
#include "snbp.hpp"
#include <iostream>
#include <string>
#include <unordered_map>
#include <functional>
#include <vector>
#include <filesystem>
#include <cstdlib>
#include <boost/algorithm/string.hpp>
#include <boost/beast/core.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/version.hpp>
#include <boost/asio/connect.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <algorithm>
#include <stdexcept>
#include <fstream>
#include <limits>
#include <iostream>
#include <string>
#include <vector>
#include <memory>
#include <sstream>
#include <iomanip>
#include <string_view>
#include <regex>
#include <strsafe.h>
#include <io.h>
#include <fcntl.h>
#include <wbemidl.h>
#include <shlobj.h>
#include <comdef.h>
and
#include <algorithm>
#include <stdexcept>
#include <fstream>
#include <limits>
#include <iostream>
#include <string>
#include <vector>
#include <memory>
#include <sstream>
#include <iomanip>
#include <string_view>
#include <regex>
#include <strsafe.h>
#include <io.h>
#include <fcntl.h>
#include <wbemidl.h>
#include <shlobj.h>
#include <comdef.h>
either move those after the boost stuff somehow, or see if you can avoid them in your header
#include <strsafe.h>
#include <io.h>
#include <fcntl.h>
#include <wbemidl.h>
#include <shlobj.h>
#include <comdef.h>
all of these
ok
unfortunately the windows sdk can be quite prickly when it comes to what order things are included in
PS C:\coding-projects\CPP-Dev\jsh> g++ src/entry_file.cpp src/snbp.cpp -o build/SQS-Alpha-Build-0063 -lws2_32 -lcrypto -lssl -std=c++20 -DSTRSAFE_NO_DEPRECATE
In file included from C:/msys64/ucrt64/include/boost/asio/detail/win_event.hpp:25,
from C:/msys64/ucrt64/include/boost/asio/detail/event.hpp:23,
from C:/msys64/ucrt64/include/boost/asio/execution/blocking_adaptation.hpp:19,
from C:/msys64/ucrt64/include/boost/asio/execution.hpp:22,
from C:/msys64/ucrt64/include/boost/asio/system_executor.hpp:20,
from C:/msys64/ucrt64/include/boost/asio/associated_executor.hpp:24,
from C:/msys64/ucrt64/include/boost/beast/core/detail/bind_handler.hpp:17,
from C:/msys64/ucrt64/include/boost/beast/core/bind_handler.hpp:14,
from C:/msys64/ucrt64/include/boost/beast/core/async_base.hpp:14,
from C:/msys64/ucrt64/include/boost/beast/core.hpp:15,
from src/entry_file.cpp:12:
C:/msys64/ucrt64/include/boost/asio/detail/socket_types.hpp:24:2: error: #error WinSock.h has already been included
24 | #error WinSock.h has already been included
| ^~~~~
In file included from C:/msys64/ucrt64/include/boost/asio/detail/socket_types.hpp:33:
C:/msys64/ucrt64/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
15 | #warning Please include winsock2.h before windows.h
| ^~~~~~~
PS C:\coding-projects\CPP-Dev\jsh> g++ src/entry_file.cpp src/snbp.cpp -o build/SQS-Alpha-Build-0063 -lws2_32 -lcrypto -lssl -std=c++20 -DSTRSAFE_NO_DEPRECATE
In file included from C:/msys64/ucrt64/include/boost/asio/detail/win_event.hpp:25,
from C:/msys64/ucrt64/include/boost/asio/detail/event.hpp:23,
from C:/msys64/ucrt64/include/boost/asio/execution/blocking_adaptation.hpp:19,
from C:/msys64/ucrt64/include/boost/asio/execution.hpp:22,
from C:/msys64/ucrt64/include/boost/asio/system_executor.hpp:20,
from C:/msys64/ucrt64/include/boost/asio/associated_executor.hpp:24,
from C:/msys64/ucrt64/include/boost/beast/core/detail/bind_handler.hpp:17,
from C:/msys64/ucrt64/include/boost/beast/core/bind_handler.hpp:14,
from C:/msys64/ucrt64/include/boost/beast/core/async_base.hpp:14,
from C:/msys64/ucrt64/include/boost/beast/core.hpp:15,
from src/entry_file.cpp:12:
C:/msys64/ucrt64/include/boost/asio/detail/socket_types.hpp:24:2: error: #error WinSock.h has already been included
24 | #error WinSock.h has already been included
| ^~~~~
In file included from C:/msys64/ucrt64/include/boost/asio/detail/socket_types.hpp:33:
C:/msys64/ucrt64/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
15 | #warning Please include winsock2.h before windows.h
| ^~~~~~~
how did you change your #includes now
snbp is last
#include <boost/algorithm/string.hpp>
#include <boost/beast/core.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/version.hpp>
#include <boost/asio/connect.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <strsafe.h>
#include <io.h>
#include <fcntl.h>
#include <wbemidl.h>
#include <shlobj.h>
#include <comdef.h>
int main() {
}
works on my machine ๐คท
and that means all the Windows includes should come later
hmm
Im using G++ with C++ 20
same here
maybe filesystem or cstdlib includes windows
it works for me and I'm using the same msys2 ucrt64 g++, boost, etc.
then why oh why is it not working
maybe you lied and forgot some includes ๐
should I add the -Wcpp compiler flag?
#include <iostream>
#include <string>
#include <unordered_map>
#include <functional>
#include <vector>
#include <filesystem>
#include <cstdlib>
#include <boost/algorithm/string.hpp>
#include <boost/beast/core.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/version.hpp>
#include <boost/asio/connect.hpp>
#include <boost/asio/ip/tcp.hpp>
#include "snbp.hpp"
this is all in the entry
I think I know why its doing this
why?
I am including snbp.hh later
but I compile it like this g++ ./entry_file.cpp ./snbp.cpp <some random compiler flags>
and snbp.cpp contains the windows includes too
each .cpp file is compiled separately
flip
if the error is reported from entry_file.cpp, it's in there
do note that I didn't edit any boost headers manually 
this is quite frustrating
did you add strsafe includes there?
in where?
in boost
I didn't need to modify boost at all, and so far it works for me ๐
WHY THE F-
I spent most of my time working in ASM and ASM was esier than this
All I have is STD includes then BOOST and after that SNBP
so that does not make sense
๐คท
So what do I do
If you can put your project on github I can try to repro the problem here, idk
reinstall boost to undo your modifications and see if that helps? 
how do I reinstall boost?
run pacman -S mingw-w64-ucrt-x86_64-boost again
it says target not found
never mind
I ran it in msy2s msys instead of msys2 mingw64
works on my machine
and now it works!!!
http://localhost:3000/ moment
today's lesson: avoid modifying external libs' headers 
Also how do I get the beginner role or the intermediate role?
can you recommend my role to be intermediate
This question is being automatically marked as stale.
If your question has been answered, type !solved.
If your question is not answered feel free to bump the post or re-ask.
Take a look at !howto ask for tips on improving your question.
just use cmake tbh
@quaint kestrel if you learn the basics of cmake its gonna make ur life way easier