|
发表于 2021-9-28 08:57:24
只看该作者
7#
本帖最后由 xinzhiling111 于 2021-9-28 09:01 编辑
另一个编译器:
compliecp="/home/zl/firefly-workspace/rv1126_rv1109_linux_release_20210306/prebuilts/gcc/linux-x86/arm/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++"
错误截图如下:
我的编译命令是用了工程里面的脚本:
./build.sh rkmedia_rtspget_vdec_rknn_venc_rtsp_test.cc
build.sh脚本内容如下:
- # SDK 目录
- SDK_PATH=`pwd`/../..
- # 编译完 buildroot 后的 sysroot 目录
- sysroot="$SDK_PATH/buildroot/output/firefly_rv1126_rv1109/host/arm-buildroot-linux-gnueabihf/sysroot"
- echo $sysroot
- # 交叉编译工具路径
- # compliecp="/home/zl/firefly-workspace/rv1126_rv1109_linux_release_20210306/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++"
- compliecp="/home/zl/firefly-workspace/rv1126_rv1109_linux_release_20210306/prebuilts/gcc/linux-x86/arm/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++"
- # compliecc="/opt/rk-linux-arm/host/bin/arm-linux-gnueabihf-gcc"
- INCLUDE_PATH="-I $sysroot/usr/include/rknn -I ./librtsp -I ./include/rkmedia -I ./include/easymedia -I ./arcsoft/inc/"
- LIB_PATH="-L ./ffrtsp -L ./librtsp -L ./arcsoft/lib -L $sysroot/usr/lib/"
- # OP="-Wl,--copy-dt-needed-entries"
- # LIB="-lffrtspGet -leasymedia -lliveMedia -lBasicUsageEnvironment -lgroupsock -lUsageEnvironment -lpthread"
- #LIBCC="-leasymedia -lpthread -lrtsp -lrknn_api"
- LIB="-lliveMedia -lBasicUsageEnvironment -lgroupsock -lUsageEnvironment -lstdc++ -lm -lc -lgcc_s -lrga"
- LIBCC="-leasymedia -lpthread -lrtsp -lrknn_api -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc"
- LIBCP="-lrtsp -lffrtsp $LIBCC $LIB"
- # LIBCP="-leasymedia -lpthread -lrtsp -lrknn_api -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc"
- if [ ! -n "$1" ];then
- src_file=$(ls *.c*)
- else
- src_file="$1"
- fi
- for i in $src_file
- do
- file_name=$(echo $i | awk -F '.' '{printf $1}')
- ctype=$(echo $i | awk -F '.' '{print $2}')
- echo $ctype
- if [ "x$ctype" == "xcc" ];then
- complie=$compliecp
- lib=$LIBCP
- else
- complie=$compliecc
- lib=$LIBCC
- fi
- echo "Start Build $file_name Demo ..."
- echo "$complie $OP $i -o $file_name $LIB_PATH $lib $INCLUDE_PATH --sysroot=$sysroot"
- $complie $OP $i -o $file_name $LIB_PATH $lib $INCLUDE_PATH --sysroot=$sysroot
- echo "Build $file_name Demo done."
- echo "Next .."
- done
复制代码
|
|