ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

arm-linux-gnueabihf-4.9 打开 NCNN_SIMPLESTL 编译报错

Open niinorz opened this issue 3 years ago • 2 comments

error log | 日志或报错信息 | ログ

In file included from /home/cdfinger/arm-linux-gnueabihf-4.9-optee/arm-linux-gnueabihf/include/c++/4.9.2/functional:49:0, from /home/cdfinger/optee_ftkalgo_project/ftkalgo/ncnn_src_20220216/layer/argmax.cpp:18: /home/cdfinger/arm-linux-gnueabihf-4.9-optee/arm-linux-gnueabihf/include/c++/4.9.2/bits/stl_function.h:354:12: error: redefinition of ‘struct std::greater<T>’ struct greater : public binary_function<_Tp, _Tp, bool> ^ In file included from /home/cdfinger/optee_ftkalgo_project/ftkalgo/ncnn_src_20220216/platform.h:241:0, from /home/cdfinger/optee_ftkalgo_project/ftkalgo/ncnn_src_20220216/allocator.h:23, from /home/cdfinger/optee_ftkalgo_project/ftkalgo/ncnn_src_20220216/mat.h:38, from /home/cdfinger/optee_ftkalgo_project/ftkalgo/ncnn_src_20220216/layer.h:18, from /home/cdfinger/optee_ftkalgo_project/ftkalgo/ncnn_src_20220216/layer/argmax.h:18, from /home/cdfinger/optee_ftkalgo_project/ftkalgo/ncnn_src_20220216/layer/argmax.cpp:15: /home/cdfinger/optee_ftkalgo_project/ftkalgo/ncnn_src_20220216/simplestl.h:329:8: error: previous definition of ‘struct std::greater<T>’ struct greater

context | 编译/运行环境 | バックグラウンド

编译工具 arm-linux-gnueabihf-4.9

how to reproduce | 复现步骤 | 再現方法

打开NCNN_SIMPLESTL 编译

more | 其他 | その他

src/layer/argmax.cpp 中 #include 加上宏控 #if !NCNN_SIMPLESTL #include #endif

niinorz avatar Jul 21 '22 10:07 niinorz

argmax 默认是不编译的,用 cmake 开关打开 NCNN_SIMPLESTL

nihui avatar Jul 22 '22 09:07 nihui

argmax 默认是不编译的,用 cmake 开关打开 NCNN_SIMPLESTL

嗯,自己写的 CMakeLists.txt 直接用了 aux_source_directory 大意了 但...这个问题,可改可不改的样子

niinorz avatar Jul 25 '22 02:07 niinorz