Closed peter-tank closed 4 years ago
class DNSServer was defined in "src/tun/dnsserver.h", the include path was set in: https://github.com/Trojan-Plus-Group/trojan-plus/blob/master/CMakeLists.txt#L98
include_directories(
src #<----- here
src/tun/lwip_custom
badvpn/lwip/src/include
badvpn
)
https://github.com/Trojan-Plus-Group/trojan-plus/blob/master/CMakeLists.txt#L169
src/tun/lwip_tcp_client.cpp
src/tun/tundev.cpp
src/tun/tunsession.cpp
src/tun/tunproxysession.cpp
src/tun/tunlocalsession.cpp
src/tun/dnsserver.cpp # <---------------------here
src/tun/udplocalforwarder.cpp
Your compiling error message:
/data/data/com.termux/files/home/trojan-plus/src/core/service.cpp:131:17: error: incomplete type 'DNSServer' named in nested name specifier if (DNSServer::get_dns_lock()) {
said cannot find DNSServer class completed defined in service.cpp, but in https://github.com/Trojan-Plus-Group/trojan-plus/blob/master/src/core/service.cpp#L39
#include "session/pipelinesession.h"
#include "session/serversession.h"
#include "utils.h"
#include "tun/dnsserver.h" // <---------------- here
#include "tun/tundev.h"
using namespace std;
using namespace boost::asio::ip;
using namespace boost::asio::ssl;
so I don't know why your compiler would give such error message.
Or CMake / Make in termux has some bug?
The codes has been test by CI: https://dev.azure.com/Trojan-Plus-Group/trojan-plus/_build
Compiling is OK.
Another information, I'm working for Trojan-Plus Android client: https://github.com/Trojan-Plus-Group/trojan-plus-app
It needs some days for first beta version.
I checked your compiling error message again, I found your boost library is 1.70, but the minimum version for Trojan-Plus is 1.72, so even if you pass this error message, you will meet another error about boost.
• pass after remove tundev and dnsserver linked with boost_0_70_0 • pass on fully compiled after upgrade to boost_0_72_0
• pass after remove tundev and dnsserver linked with boost_0_70_0 • pass on fully compiled after upgrade to boost_0_72_0
Cool!
tundev and dnsserver is prepare for Android/iOS Lib, so if you remove these modules, it will be fine.
failed in compiling from android termux, seems no easier way to do so? Maybe there neeeds explicit options on tunedev and dnsserver.