msnh2012 / Msnhnet

🔥 (yolov3 yolov4 yolov5 unet ...)A mini pytorch inference framework which inspired from darknet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation failed

ou525 opened this issue · comments

Thank you very much for your work
After adding c++11 support, set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -pthread"), there are a lot of errors, see the text for details.

error.txt

You can add C++11 support using the following command, add_definitions(-std=c++11) or add_compile_options(-std=c++11)

ref: Changing CMAKE_CXX_FLAGS in project

我已经添加了c++11支持,这是添加之后报错的

我这加了c++11没问题,你是什么环境?还有感觉像是头文件出错,你重新git一份试试?

现在还有这个问题,我加了c++11支持,把枚举前面的::去掉了,还改了qt低于5.5的qOverload为static_cast,还有这个问题
/usr/local/include/yaml-cpp/stlemitter.h:19:25: error: expected unqualified-id before ‘:’ token
for (const auto& emit : seq)
^
/usr/local/include/yaml-cpp/stlemitter.h:20:20: error: expected primary-expression before ‘;’ token
emitter << emit;
^
/usr/local/include/yaml-cpp/stlemitter.h: In function ‘YAML::Emitter& YAML::operator<<(YAML::Emitter&, const std::map<T, U>&)’:
/usr/local/include/yaml-cpp/stlemitter.h:43:25: error: expected unqualified-id before ‘:’ token
for (const auto& emit : m)
^
/usr/local/include/yaml-cpp/stlemitter.h:44:27: error: expected primary-expression before ‘.’ token
emitter << Key << emit.first << Value << emit.second;
^
/usr/local/include/yaml-cpp/stlemitter.h:44:50: error: expected primary-expression before ‘.’ token
emitter << Key << emit.first << Value << emit.second;

你要不工程发我下,我瞅瞅