Category : boost

I am building a Qt application using Windows and MinGW64. I need to use Boost Stacktrace to generate stack traces like the Linux build of the application already does. The correpsonding switch BOOST_STACKTRACE_USE_BACKTRACE (as descibed in https://www.boost.org/doc/libs/1_65_1/doc/html/stacktrace/configuration_and_build.html) is set and everything works fine on Linux. However on Windows the libbacktrace library is missing. The above ..

Read more

I’m trying to set up a stacktrace logging signal handler using boost::stacktrace. The Boost documentation suggests: #include <signal.h> // ::signal, ::raise #include <boost/stacktrace.hpp> void my_signal_handler(int signum) { ::signal(signum, SIG_DFL); boost::stacktrace::safe_dump_to("./backtrace.dump"); ::raise(SIGABRT); } However, the output from this file is a binary format which the docs don’t seem to mention how to read, except for using ..

Read more

H’ello I’m struggling to build examples from Boost.Asio module on Windows with CMake buildsystem. I want to link boost libraries statically. I built libraries with b2 –with-system –with-thread –with-date_time –with-regex –with-serialization stage (default output dir is bin.v2). My CMakeLists.txt looks like add_executable(network_communicator main.cpp) set(BOOST_ROOT "C:boost_1_76_0") set(BOOST_LIBRARYDIR "C:boost_1_76_0bin.v2libs") SET(Boost_USE_STATIC_LIBS ON) find_package(Boost COMPONENTS thread REQUIRED) target_include_directories(network_communicator PRIVATE ..

Read more

I am getting this strange error when compiling a large CPP file, at this line: #include <boost/regex/v4/regex.hpp> Error C2027 use of undefined type ‘boost::mpl::bool_’ C:githubmicrosoftvcpkginstalledx86-windowsincludeboostregexv4basic_regex_parser.hpp 59 In bool_fwd.hpp I see: typedef bool_<true> true_; typedef bool_<false> false_; In basic_regex_parser.hpp this is the line generating the error: inline boost::intmax_t umax() { return umax(mpl::bool_<std::numeric_limits<boost::intmax_t>::digits >= std::numeric_limits<std::size_t>::digits>()); } It ..

Read more

Is that possible to construct a boost::beast::http::message (specifically I have to construct a boost::beast::http::response<bb_http::string_body>) from std::string, std::string_view or other raw buffer? Maybe there is some kind of parser? From what I see in boost beast samples, we can either: receive a response from boost::beast::read* functions. In that case the first argument should be a SyncReadStream, ..

Read more