sliver-chen / mpp_linux_cpp

a demo shows that how to use rockchip mpp framework in linux
58 stars 65 forks source link

find not -lmpp #9

Open happy-xxw opened 1 year ago

happy-xxw commented 1 year ago

libmpp ? rk3588\external\mpp ,Official mpp code is compiled without libmpp,only libmpp_rc.a libmpp_codec.a libmpp_base.a ...

rk@linaro-alip:~/xxw$ sudo find / -name libmpp* [sudo] rk 的密码: /home/rk/xxw/mpp/build1/mpp/codec/libmpp_rc.a /home/rk/xxw/mpp/build1/mpp/codec/libmpp_codec.a /home/rk/xxw/mpp/build1/mpp/base/libmpp_base.a /home/rk/xxw/mpp/build1/mpp/vproc/libmpp_vproc.a /home/rk/xxw/mpp/build1/mpp/hal/libmpp_hal.a

root@linaro-alip:/home/rk/xxw/mpp_linux_cpp-master/build# make Scanning dependencies of target mpp_linux_demo [ 12%] Building CXX object CMakeFiles/mpp_linux_demo.dir/main.cpp.o [ 25%] Building CXX object CMakeFiles/mpp_linux_demo.dir/mpp/Codec.cpp.o /home/rk/xxw/mpp_linux_cpp-master/mpp/Codec.cpp: In member function ‘int Codec::deinit()’: /home/rk/xxw/mpp_linux_cpp-master/mpp/Codec.cpp:471:1: warning: control reaches end of non-void function [-Wreturn-type] 471 | } | ^ [ 37%] Building CXX object CMakeFiles/mpp_linux_demo.dir/thread/Thread.cpp.o /home/rk/xxw/mpp_linux_cpp-master/thread/Thread.cpp: In member function ‘int Thread::init()’: /home/rk/xxw/mpp_linux_cpp-master/thread/Thread.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type] 30 | } | ^ [ 50%] Building CXX object CMakeFiles/mpp_linux_demo.dir/rkrga/RGA.cpp.o [ 62%] Building C object CMakeFiles/mpp_linux_demo.dir/rkdrm/bo.c.o [ 75%] Building C object CMakeFiles/mpp_linux_demo.dir/rkdrm/dev.c.o [ 87%] Building C object CMakeFiles/mpp_linux_demo.dir/rkdrm/modeset.c.o [100%] Linking CXX executable mpp_linux_demo /usr/bin/ld: 找不到 -lmpp collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/mpp_linux_demo.dir/build.make:193:mpp_linux_demo] 错误 1 make[1]: [CMakeFiles/Makefile2:95:CMakeFiles/mpp_linux_demo.dir/all] 错误 2 make: *** [Makefile:103:all] 错误 2

oneflyingfish commented 7 months ago

我是这样解决的,倒是编译通过了

ln -s /usr/local/lib/librockchip_mpp.so /usr/local/lib/libmpp.so
ln -s /usr/local/lib/librockchip_vpu.so /usr/local/lib/libvpu.so

记得在/etc/profile中添加环境变量:

export CPLUS_INCLUDE_PATH=/usr/local/include/rockchip/:$CPLUS_INCLUDE_PATH
export PATH=/usr/local/lib/:$PATH