臻识TCP摄像头 SDK交叉编译

  1. 修改arm_make.cmake文件
    修改后的文件内容:
# CMake toolchain file for building ARM software on OI environment

include(CMakeForceCompiler)
# this one is important
SET(CMAKE_SYSTEM_NAME Linux)
set( CMAKE_SYSTEM_PROCESSOR arm ) 
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)

# specify the cross compiler
SET(CMAKE_C_COMPILER   **arm-linux-gnueabihf-**gcc)
SET(CMAKE_CXX_COMPILER **arm-linux-gnueabihf-**g++)
SET(CMAKE_STRIP **arm-linux-gnueabihf-**strip)
CMAKE_FORCE_C_COMPILER(**arm-linux-gnueabihf-**gcc GNU)
CMAKE_FORCE_CXX_COMPILER(**arm-linux-gnueabihf-**g++ GNU)

#SET(CMAKE_C_COMPILER   gcc)
#SET(CMAKE_CXX_COMPILER g++)
#SET(CMAKE_STRIP strip)

# where is the target environment 
#SET(CMAKE_FIND_ROOT_PATH  "/mnt/hgfs/Share/cmake project/libvznet")

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  1. 编写编译脚本
    1. 创建 build目录,mkdir build
    2. cd build
    3. 创建 mk.sh, vim mk.sh ,输入内容
#!/bin/bash
CC=/home/zwq/cross_tool/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc  CXX=/home/zwq/cross_tool/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ cmake .. -DJSONCPP_WITH_TESTS=OFF -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF -DENABLE_UNIT_TEST=OFF

make

注意:其中 CC=、CXX=改成自己的交叉编译器

  1. 编译SDK
 ./mk.sh
  1. 编译输出文件
    1. 库文件路径 lib/unix/libvztcpsdk_dynamic.so
    2. 可执行文件路径 bin/unix/sdk_test

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值