Open luckypoem opened 5 years ago
@luckypoem Hi! 抱歉八月太忙了没注意到issue。 从报错来看该是C++17没有开启。 另外这边还在重构,应该会在近期发布,欢迎试用重构后的版本 :)
可以试试全新版本 :)
hi. 还是不行: make后,显示: ... [ 95%] Building CXX object CMakeFiles/tun2socks.dir/connector/connector.cpp.o In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:30:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:35:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:40:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:45:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:50:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:55:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:60:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:65:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:70:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:75:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:80:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:88:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:95:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:100:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:105:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:110:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:115:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:120:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1: In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11: /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:128:9: error: use of class template 'std::lock_guard' requires template arguments CORE_LOCK; ^ /Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from macro 'CORE_LOCK'
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: [CMakeFiles/tun2socks.dir/connector/connector.cpp.o] Error 1 make[1]: [CMakeFiles/tun2socks.dir/all] Error 2 make: *** [all] Error 2 yudeMacBook-Air:tun2socks-by-wtdcode brite$
如何解决?
看起来像是std::lock_guard的问题,另外你是在macos编译的吗?
是啊
即使是上一版也没支持macos……
From: luckypoem notifications@github.com Sent: Thursday, January 30, 2020 3:43:39 PM To: wtdcode/tun2socks tun2socks@noreply.github.com Cc: Mio ziqiaokong@outlook.com; State change state_change@noreply.github.com Subject: Re: [wtdcode/tun2socks] make遇错 (#1)
是啊
― You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/wtdcode/tun2socks/issues/1?email_source=notifications&email_token=AHJULO6FDYVXA5ZMZLOH2DDRAKAKXA5CNFSM4ISBLYPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKJ76BY#issuecomment-580124423, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHJULO3MNHXAE7P5AXCFOUDRAKAKXANCNFSM4ISBLYPA.
hi.
make还是有问题: [ 95%] Building CXX object CMakeFiles/tun2socks.dir/core/core.cpp.o /Users/brite/tun2socks-by-wtdcode/core/core.cpp:18:14: error: use of class template 'std::lock_guard' requires template arguments std::lock_guard guard(wrapper::LwIP::Instance().GetLock()); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ /Users/brite/tun2socks-by-wtdcode/core/core.cpp:118:10: error: use of class template 'std::lock_guard' requires template arguments std::lockguard guard(this->mtx); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ /Users/brite/tun2socks-by-wtdcode/core/core.cpp:130:10: error: use of class template 'std::lock_guard' requires template arguments std::lockguard guard(this->mtx); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/mutex_base:72:29: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY lock_guard ^ 3 errors generated. make[2]: [CMakeFiles/tun2socks.dir/core/core.cpp.o] Error 1 make[1]: [CMakeFiles/tun2socks.dir/all] Error 2 make: *** [all] Error 2 yudeMacBook-Air:build brite$
hi。
运行 make 显示如下: ... /Users/brite/tun2socks-by-wtdcode/tun2socks-core/./include/tuntap.h:3:10: fatal error: 'string_view' file not found
include
4 warnings and 2 errors generated. make[2]: [tun2socks-core/CMakeFiles/tun2socks-core.dir/tun2socks-core.cpp.o] Error 1 make[1]: [tun2socks-core/CMakeFiles/tun2socks-core.dir/all] Error 2 make: *** [all] Error 2 yudeMacBook-Air:tun2socks-by-wtdcode brite$
怎么解决?