编译jrtplib的时候出现问题

 编译环境:

ubuntu12.04

gcc 4.6.1



编译jrtplib的时候出现问题

rtperrors.cpp:206:1: warning: deprecated conversion from string constant to 'cha
r*' [-Wwrite-strings]
rtperrors.cpp:206:1: warning: deprecated conversion from string constant to 'cha
r*' [-Wwrite-strings]
rtperrors.cpp:206:1: warning: deprecated conversion from string constant to 'cha
r*' [-Wwrite-strings]
rtperrors.cpp:206:1: warning: deprecated conversion from string constant to 'cha
r*' [-Wwrite-strings]
rtperrors.cpp:206:1: warning: deprecated conversion from string constant to 'cha
r*' [-Wwrite-strings]
rtperrors.cpp:206:1: warning: deprecated conversion from string constant to 'cha
r*' [-Wwrite-strings]
rtperrors.cpp:206:1: warning: deprecated conversion from string constant to 'cha
r*' [-Wwrite-strings]
rtperrors.cpp: In function 'std::string RTPGetErrorString(int)':
rtperrors.cpp:225:36: error: 'snprintf' was not declared in this scope
make[1]: *** [rtperrors.lo] 错误 1
make[1]:正在离开目录 `/home/chenyu/chenyu/jrtplib-3.7.1/src'

make: *** [all-recursive] 错误 1


解决方法:src目录下找到rtpdefines.h文件,在里面加入:

#include <stdio.h> 
#include <stdarg.h> 
#include <string.h>

保存,再次编译,就可以了。。。。。。。。。。

你可能感兴趣的:(编译jrtplib的时候出现问题)