hi3516a arm-hisiv300-linux-gcc jrtplib交叉编译

时间:2023-03-08 16:22:04
hi3516a arm-hisiv300-linux-gcc jrtplib交叉编译

1、进入JThread-1.2.1文件夹

2、./configure --prefix=/home/suxuandong/Documents/qth264/hi3516/jrtpjthreadhisi/JThread-1.2.1/build -host=arm-hisiv300-linux CC=arm-hisiv300-linux-gcc CXX=arm-hisiv300-linux-g++

3、make

4、make install

5、进入JRTPLIB-3.7.1文件夹

6、./configure --prefix=/home/suxuandong/Documents/qth264/hi3516/jrtpjthreadhisi/JRTPLIB-3.7.1/build -host=arm-hisiv300-linux --with-jthread-includes=/home/suxuandong/Documents/qth264/hi3516/jrtpjthreadhisi/JThread-1.2.1/build/include/jthread CC=arm-hisiv300-linux-gcc CXX=arm-hisiv300-linux-g++ LDFLAGS=-L/home/suxuandong/Documents/qth264/hi3516/jrtpjthreadhisi/JThread-1.2.1/build/lib/:/opt/hisi-linux/x86-arm/arm-hisiv300-linux/arm-hisiv300-linux-uclibcgnueabi/lib:/opt/hisi-linux/x86-arm/arm-hisiv300-linux/arm-hisiv300-linux-uclibcgnueabi:/opt/hisi-linux/x86-arm/arm-hisiv300-linux/:/home/suxuandong/Documents/qth264/hi3516/jrtpjthreadhisi/JThread-1.2.1/build/lib/libjthread.so

7、make

8、make install

9、将jthread相关头文件和库文件拷贝到jrtplib目录下

10、arm-hisiv300-linux-g++ -o example1 example1.cpp -I ../build/include/jrtplib3 -L ../build/lib -ljrtp -ljthread -lpthread

编译jrtplib过程中会出现找不到库的情况,解决方法是在configure过程中的
LDFLAGS标志中添加库路径。