当前位置: 技术问答>linux和unix
linux下编译jrtp和alsa出错
来源: 互联网 发布时间:2016-12-31
本文导语: 我想写一个使用alsalib一边录音一边使用rtp从主机发送到目标板程序,不论编译发送程序(录音和rtp发送)在PC机上进行,这里编译工具时g++;在目标板上是接收程序,编译工具是arm-none-linux-gnueabi-g++ ,都报错如下: ...
我想写一个使用alsalib一边录音一边使用rtp从主机发送到目标板程序,不论编译发送程序(录音和rtp发送)在PC机上进行,这里编译工具时g++;在目标板上是接收程序,编译工具是arm-none-linux-gnueabi-g++ ,都报错如下:
g++ rtp-alsa-record-send.cpp -o rtp-alsa-record-send -I/opt/alsalib/include -L/opt/alsalib/lib -l asound -I/opt/pc-jrtp/include/jrtplib3 -L/opt/pc-jrtp/lib -l jrtp -L/opt/pc-jrtp/lib -l jthread
usr/bin/ld: skipping incompatible /opt/alsalib/lib/libasound.so when searching for -lasound
/usr/bin/ld: skipping incompatible /opt/alsalib/lib/libasound.a when searching for -lasound
/usr/bin/ld: cannot find -lasound
collect2: ld returned 1 exit status
arm-none-linux-gnueabi-g++ rtp-alsa-receive.cpp -o rtp-alsa-receive -I/opt/alsalib/include -L/opt/alsalib/lib -l asound -I/opt/pc-jrtp/include/jrtplib3 -L/opt/pc-jrtp/lib -l jrtp -L/opt/pc-jrtp/lib -l jthread
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/pc-jrtp/lib/libjrtp.so when searching for -ljrtp
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/pc-jrtp/lib/libjrtp.a when searching for -ljrtp
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/pc-jrtp/lib/libjrtp.so when searching for -ljrtp
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/pc-jrtp/lib/libjrtp.a when searching for -ljrtp
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -ljrtp
collect2: ld returned 1 exit status
请各位高手指导下是怎么回事,skipping incompatible 是什么不兼容吗?
g++ rtp-alsa-record-send.cpp -o rtp-alsa-record-send -I/opt/alsalib/include -L/opt/alsalib/lib -l asound -I/opt/pc-jrtp/include/jrtplib3 -L/opt/pc-jrtp/lib -l jrtp -L/opt/pc-jrtp/lib -l jthread
usr/bin/ld: skipping incompatible /opt/alsalib/lib/libasound.so when searching for -lasound
/usr/bin/ld: skipping incompatible /opt/alsalib/lib/libasound.a when searching for -lasound
/usr/bin/ld: cannot find -lasound
collect2: ld returned 1 exit status
arm-none-linux-gnueabi-g++ rtp-alsa-receive.cpp -o rtp-alsa-receive -I/opt/alsalib/include -L/opt/alsalib/lib -l asound -I/opt/pc-jrtp/include/jrtplib3 -L/opt/pc-jrtp/lib -l jrtp -L/opt/pc-jrtp/lib -l jthread
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/pc-jrtp/lib/libjrtp.so when searching for -ljrtp
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/pc-jrtp/lib/libjrtp.a when searching for -ljrtp
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/pc-jrtp/lib/libjrtp.so when searching for -ljrtp
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /opt/pc-jrtp/lib/libjrtp.a when searching for -ljrtp
/omap3530/CodeSourcery/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -ljrtp
collect2: ld returned 1 exit status
请各位高手指导下是怎么回事,skipping incompatible 是什么不兼容吗?
|
第一个用g++编译出错是因为
/opt/alsalib/lib/libasound.so 是交叉编译出来的库.
第二个错是因为:
/opt/pc-jrtp/lib/libjrtp.so 不是你的交叉编译器编译出来的.
/opt/alsalib/lib/libasound.so 是交叉编译出来的库.
第二个错是因为:
/opt/pc-jrtp/lib/libjrtp.so 不是你的交叉编译器编译出来的.