|
本帖最后由 alexanderdumas 于 2023-10-26 16:19 编辑
用的最新的github的librga
https://github.dev/airockchip/li ... a_cvtcolor_demo.cpp
在rk3588X上编译,ld不到immakeBorder,编译情况如下:
Scanning dependencies of target utils_obj
[ 20%] Building CXX object CMakeFiles/utils_obj.dir/home/linaro/wqb/librga/samples/utils/allocator/dma_alloc.cpp.o
[ 60%] Building CXX object CMakeFiles/utils_obj.dir/home/linaro/wqb/librga/samples/utils/allocator/drm_alloc.cpp.o
[ 60%] Building CXX object CMakeFiles/utils_obj.dir/home/linaro/wqb/librga/samples/utils/utils.cpp.o
[ 60%] Built target utils_obj
Scanning dependencies of target rga_padding_demo
[ 80%] Building CXX object src/CMakeFiles/rga_padding_demo.dir/rga_padding_demo.cpp.o
[100%] Linking CXX executable rga_padding_demo
/usr/bin/ld: CMakeFiles/rga_padding_demo.dir/rga_padding_demo.cpp.o: in function `main':
rga_padding_demo.cpp: (.text.startup+0x320): undefined reference to `immakeBorder(rga_buffer_t, rga_buffer_t, int, int, int, int, int, int, int, int, int*)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/rga_padding_demo.dir/build.make:109:src/rga_padding_demo] 错误 1
make[1]: *** [CMakeFiles/Makefile2:142:src/CMakeFiles/rga_padding_demo.dir/all] 错误 2
make: *** [Makefile:149:all] 错误 2
[ 60%] Built target utils_obj
[ 80%] Linking CXX executable rga_padding_demo
===============================》查看例程的so看下:
nm -D /home/linaro/wqb/librga/samples/resize_demo/../../libs/Linux/gcc-aarch64/librga.so |grep immakeBorder
显示如下:
000000000001d6d0 T _Z12immakeBorder12rga_buffer_tS_iiiiiiiiPi
两个so我都尝试了,一个是系统已经在在/usr/lib/aarch64-linux-gnu。一个是github自带的so。都试过了。都ld有问题。
其他的reszie和cvtcolor未出现ld错误。
目的就是想替换opencv的copyMakeBorder。
有个变通的想法。就是resize之后,然后放到copy到一个图的中间,请问用哪个函数呢?
|
|