本文为本人开发RTCP协议demo时出现的问题
关于RTCP协议详情以及github源码请自行查找,本人测试demo为Ubantu与Windows之间的RTCP通道建立,以及控制端口的使用,使用eclipse开发。
目录
使用eclipse的时候helloworld编译不报错但是运行不了
launch failed, binary not found.
Linux下Eclipse编译时,报recompile with -fPIC错误,解决方法
发现RTPSession里面貌似有自动调用RTCPschedule然后每隔五秒发送一次SR报文。并且找到了马上发送APP和UNKOWN报文的接口,但是貌似没有SR和RR的发送接口
使用eclipse的时候helloworld编译不报错但是运行不了
运行报错Exec_tty error:Cannot run program
解决方案:
先选中GNU ELF Parser然后再配置Run Configure,选中需要编译的项目,有的时候Elipse不会自动选择
std cout找不到
解决方法:MinGW从4.6.2及以后的版本中出现了这类问题。它的自动检测功能被去掉了,不能再自动地找到标准目录的东西了。为了解决这个问题,让编译器在build的时候用英文结果输出。具体的操作步骤是: "Window -> Preferences -> C/C++ -> Build -> Environment", 增加两个新的环境变量: "LANG" and "LC_ALL" 并把它们的值都设成是: "en_US". 如果还有错误提示,保存下工程,错误的提示就会消失了。这是我看别人提供的一个解决方案,亲试可以行。
launch failed, binary not found.
解决办法,工具栏run->run configuration;双击c/c++ application出现HelloWorldCPP debug,选中;Main标签下,c/c++ application:search project->选中HelloWorldCPP->OK;common标签下,勾选Debug和Run->apply->run;后续可以直接点击工具栏三角形进行运行了。
Linux下Eclipse编译时,报recompile with -fPIC错误,解决方法
libjrtp.a(rtcpapppacket.cpp.o): relocation R_X86_64_32 against symbol `_ZTVN7jrtplib13RTCPAPPPacketE' can not be used when making a PIE object; recompile with -fPIC
https://blog.youkuaiyun.com/shenchen8274/article/details/7822822
解决方法是:右键Eclipse工程,propertise->c/c++ build->settings->GCC C Compiler->Command:
gcc 后面加上-fPIC,重新编译,解决。 记得是紧跟的!!!
一直在makefile的输出echo出错
解决方案:
https://stackoverflow.com/questions/3485941/eclipse-cdt-error-make-src-test2-o-error-127?noredirect=1&lq=1
Terminal: executed which make --> /usr/bin/make
Terminal: executed which echo --> /bin/echo
Eclipse: Under Project Properties > C/C++ Build > Environment, I made sure the contents of the PATH variable were /usr/bin:/bin, this is, the full path for make and echo, respectively.
可是还是不行
后来学长直接把库复制到usr/local/lib里面然后做了软连接
<