I am writing a multiplatform program in c++ that should run on AMD and Raspberry Pi 4.
On AMD I installed cpp-httplib-dev like this: sudo apt-get install libcpp-httplib-dev
and then the code like below works just fine.
#include <httplib.h>
...
httplib::Server svr;
svr.Get("/hi", [](const httplib::Request &, httplib::Response &res)
{ res.set_content("Hello", "text/plain");});
std::thread _thread( [&](){svr.listen("0.0.0.0", 8080);} );
But I cannot install such a library on Raspberry Pi.
I was looking for something similar to apt search with no results for C++.
Question: Is it possible to create a simple HTTP server on Raspberry Pi with just C++? If yes, how?
If not, what are possible solutions?
NOTE: My project is quite big and must be in C++. Eventually, I can have the server part written in another compilable language, but how then pass information between those programs?
(Then just need to pass simple strings between programs, like: "R1 Down", "R4 R5 R8 Up")
apt show libcpp-httplib-devsuggests the package does exist - what version of Raspbbery Pi OS have you got installed?