I am using boost for TCP SSL connection websocket connection. I am doing cross compilation for linux based payment terminal using scons. I have not build boost as asio is header based inline library(as mentioned in boost portal) correct me if I am wrong. However I don't see inline function in boost/asio/ssl/context.hpp
I am getting error "Undefined reference to boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) undefined reference to `boost::asio::ssl::context::~context()'
#include "boost/beast/websocket.hpp"
#include <boost/beast/core.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/beast/websocket/ssl.hpp>
#include <boost/asio/connect.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ssl/stream.hpp>
int WebSocketClient::Async_connect(std::string url)
{
boost::asio::io_context ioc;
ssl::context ctx{ssl::context::tlsv12_client};
// I am getting error while creating context object
//std::make_shared<session>(ioc, ctx)->run(host, port, sendMessage.c_str(), link);
//ioc.run();
}
Why scons giving error- undefined reference if I have included required headers? DO we really need to build boost for using asio,boost beast?
Aucun commentaire:
Enregistrer un commentaire