moli232777144 / mtcnn_ncnn

基于ncnn框架搭建win及android端的MTCNN人脸检测工程
523 stars 176 forks source link

参照readme->PC端调试->编译ncnn 失败 #42

Open chenrenxue opened 4 years ago

chenrenxue commented 4 years ago

参照readme,在PC端进行编译。步骤如下: 1.下载源码并更新子模块 2.编译protobuf 通过

  1. 编译ncnn cd ../3rdparty/src/ncnn mkdir build cd build cmake .. -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%cd%/install -DProtobuf_INCLUDE_DIR=E:\hawk-skys\mtcnn_ncnn\mtcnn_ncnn\3rdparty\include -DProtobuf_LIBRARIES=E:\hawk-skys\mtcnn_ncnn\mtcnn_ncnn\3rdparty\lib\libprotobuf.lib -DProtobuf_PROTOC_EXECUTABLE=E:\hawk-skys\mtcnn_ncnn\mtcnn_ncnn\3rdparty\bin\protoc.exe

出错信息如下: E:\hawk-skys\mtcnn_ncnn\mtcnn_ncnn\3rdparty\src\ncnn\build>cmake .. -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%cd%/install -DProtobuf_INCLUDE_DIR=E:\hawk-skys\mtcnn_ncnn\mtcnn_ncnn\3rdparty\include -DProtobuf_LIBRARIES=E:\hawk-skys\mtcnn_ncnn\mtcnn_ncnn\3rdparty\lib\libprotobuf.lib -DProtobuf_PROTOC_EXECUTABLE=E:\hawk-skys\mtcnn_ncnn\mtcnn_ncnn\3rdparty\bin\protoc.exe -- CMAKE_INSTALL_PREFIX = E:\hawk-skys\mtcnn_ncnn\mtcnn_ncnn\3rdparty\src\ncnn\build/install -- Target arch: x86 -- OpenCV library: C:/Users/Administrator/Downloads/opencv/build -- version: 3.4.10 -- libraries: opencv_world -- include path: C:/Users/Administrator/Downloads/opencv/build/include;C:/Users/Administrator/Downloads/opencv/build/include/opencv CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindProtobuf.cmake:469 (file): file STRINGS file "E:/hawk-skys/mtcnn_ncnn/mtcnn_ncnn/3rdparty/include/google/protobuf/stubs/common.h" cannot be read. Call Stack (most recent call first): tools/caffe/CMakeLists.txt:2 (find_package)

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindProtobuf.cmake:475 (math): math cannot parse the expression: " / 1000000": syntax error, unexpected exp_DIVIDE (2). Call Stack (most recent call first): tools/caffe/CMakeLists.txt:2 (find_package)

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindProtobuf.cmake:476 (math): math cannot parse the expression: " / 1000 % 1000": syntax error, unexpected exp_DIVIDE (2). Call Stack (most recent call first): tools/caffe/CMakeLists.txt:2 (find_package)

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindProtobuf.cmake:477 (math): math cannot parse the expression: " % 1000": syntax error, unexpected exp_MOD (2). Call Stack (most recent call first): tools/caffe/CMakeLists.txt:2 (find_package)

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindProtobuf.cmake:469 (file): file STRINGS file "E:/hawk-skys/mtcnn_ncnn/mtcnn_ncnn/3rdparty/include/google/protobuf/stubs/common.h" cannot be read. Call Stack (most recent call first): tools/onnx/CMakeLists.txt:2 (find_package)

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindProtobuf.cmake:475 (math): math cannot parse the expression: " / 1000000": syntax error, unexpected exp_DIVIDE (2). Call Stack (most recent call first): tools/onnx/CMakeLists.txt:2 (find_package)

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindProtobuf.cmake:476 (math): math cannot parse the expression: " / 1000 % 1000": syntax error, unexpected exp_DIVIDE (2). Call Stack (most recent call first): tools/onnx/CMakeLists.txt:2 (find_package)

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindProtobuf.cmake:477 (math): math cannot parse the expression: " % 1000": syntax error, unexpected exp_MOD (2). Call Stack (most recent call first): tools/onnx/CMakeLists.txt:2 (find_package)

CMake Warning at tools/quantize/CMakeLists.txt:26 (message): OpenCV not found, quantize tools won't be built

-- Configuring incomplete, errors occurred! See also "E:/hawk-skys/mtcnn_ncnn/mtcnn_ncnn/3rdparty/src/ncnn/build/CMakeFiles/CMakeOutput.log".

chenrenxue commented 4 years ago

3rdparty/include 下只有Openvc 文件夹,没有google文件夹