ncnn安裝教程


https://blog.csdn.net/u012505617/article/details/88581235

 

下載protobuf並安裝,我使用的是3.7最新版本,下載地址為:https://github.com/protocolbuffers/protobuf/releases/tag/v3.7.0

再下載這個protobuf-all-3.7.0.tar.gz,並解壓然后編譯。

  1.  
    cd protobuf-3.7.0
  2.  
    ./configure
  3.  
    make
  4.  
    make check
  5.  
    sudo make install
  6.  
    sudo ldconfig # refresh shared library cache

安裝完成,查看版本號:

protoc --version

 

2.安裝ncnn

  1.  
    $ git clone https://github.com/Tencent/ncnn.git
  2.  
    $ cd ncnn
  3.  
    $ cd build
  4.  
    $ cmake -DNCNN_VULKAN=OFF ..
  5.  
    $ make -j8
  6.  
    $ make install

這樣在ncnn/build/install/ 就會生成include  lib 文件夾。里面包含自己所需的頭文件和ncnn 庫文件。

如果出現錯誤:/usr/bin/ld: cannot find -lncnn

那么解決方法是編譯好ncnn然后在cmakelist中庫連接中加如路徑:

set(ZQCNN_LIBRARY_DIR
${CMAKE_CURRENT_LIST_DIR}/3rdparty/lib
${CMAKE_CURRENT_LIST_DIR}/ncnn/build/install/lib)  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM