sdk
sdk copied to clipboard
交叉编译问题
可以用交叉编译工具链在其他平台上编译 sdk 吗?比如 QNX 和 Android ?
make PLATFORM=${QNX_HOST}/usr/bin/ntoaarch64 -j4
QNX没有编译过, android可以, 有Android的makefile
Android编译遇到了问题
$ ndk-build NDK_PROJECT_PATH=. APP_PLATFORM=android-30 APP_BUILD_SCRIPT=./Android.mk
[arm64-v8a] Compile++ : test <= test.cpp
[arm64-v8a] SharedLibrary : libtest.so
ld: error: undefined symbol: sdp_a_rtpmap_test
>>> referenced by test.cpp:88 (./test/test.cpp:88)
>>> ./obj/local/arm64-v8a/objs/test/test/test.o:(main)
ld: error: undefined symbol: rtsp_header_range_test
>>> referenced by test.cpp:89 (./test/test.cpp:89)
>>> ./obj/local/arm64-v8a/objs/test/test/test.o:(main)
ld: error: undefined symbol: rtsp_header_rtp_info_test
>>> referenced by test.cpp:90 (./test/test.cpp:90)
>>> ./obj/local/arm64-v8a/objs/test/test/test.o:(main)
ld: error: undefined symbol: rtsp_header_transport_test
>>> referenced by test.cpp:91 (./test/test.cpp:91)
>>> ./obj/local/arm64-v8a/objs/test/test/test.o:(main)
ld: error: undefined symbol: rtsp_client_auth_test
>>> referenced by test.cpp:97 (./test/test.cpp:97)
>>> ./obj/local/arm64-v8a/objs/test/test/test.o:(main)
ld: error: undefined symbol: rtsp_example
>>> referenced by test.cpp:140 (./test/test.cpp:140)
>>> ./obj/local/arm64-v8a/objs/test/test/test.o:(main)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/home/user/Opt/android-ndk-r22b/build/core/build-binary.mk:728: obj/local/arm64-v8a/libtest.so] Error 1
看错误应该是makefile中没有添加这些文件,test的Android.mk文件是你自己添加的吗?
移植到QNX平台的时候,发现不支持epoll机制,继续移植需要怎么做?
make -C libaio
make[2]: Entering directory '/home/zhengqijun/Project/rtsp_qnx/sdk/libaio'
../source/port/aio-socket-epoll.c:3:23: fatal error: sys/epoll.h: No such file or directory
compilation terminated.
../gcc.mk:91: recipe for target 'debug.qnx/objs/../source/port/aio-socket-epoll.o' failed
make[2]: *** [debug.qnx/objs/../source/port/aio-socket-epoll.o] Error 1
需要用到哪些功能? libaio目前应该只有libhttp需要, rtsp不依赖这个库。
如果只编译rtsp相关的库和测试代码,需要哪些文件呢
如果只需要rtsp库,只需要编译librtsp和librtp,并且会依赖一些sdk下的文件,根据编译错误信息直接单独加到编译项目里就行; 如果需要用到rtsp_muxer/rtsp_demuxer,依赖libflv和avcodec; 如果需要用rtsp的aio库,需要依赖libaio‘