Файлы следующие:
HTTPClient.hpp< /p>
Код: Выделить всё
#ifndef HTTPCLIENT_HPP
#define HTTPCLIENT_HPP
#include
class HTTPClient.hpp {
public:
CBClient(boost::json json_val);
}
# endif
Код: Выделить всё
#include
#include
HTTPClient::CBClient(boost::json json_val) {
// uses boost::ssl somewhere here
}
Код: Выделить всё
#ifndef WEBSOCKETCLIENT_HPP
#define WEBSOCKETCLIENT_HPP
#include
class WebsocketClient.hpp {
public:
CBClient(boost::json json_val);
}
# endif
Код: Выделить всё
#include
#include
#include
WebsocketClient::CBClient(boost::json json_val) {
// uses boost::ssl here
// uses jwt here
}
Код: Выделить всё
#ifndef A_HPP
#define A_HPP
#include
class A.hpp {
public:
A();
do_something();
private:
WebsocketClient ws;
}
# endif
Код: Выделить всё
#ifndef B_HPP
#define B_HPP
#include
class B.hpp {
public:
B();
do_something_else();
private:
HTTPClient client;
}
# endif
Код: Выделить всё
#ifndef UTIL_HPP
#define UTIL_HPP
// util functions
class Util {
public:
Util();
foo();
}
# endif
Код: Выделить всё
#include
Util::Util() {
}
Util::foo() {
}
# endif
Код: Выделить всё
#include
Подробнее здесь: [url]https://stackoverflow.com/questions/79059922/duplicate-symbols-only-for-boost-json[/url]