onvif客户端(SOAPClient)编译错误记录

简介: onvif客户端(SOAPClient)编译错误记录

1.freelocale未定义


问题编译错误提示:

stdsoap2.c:7468:对‘freelocale’未定义的引用
stdsoap2.c:7468:对‘freelocale’未定义的引用
stdsoap2.c:7468:对‘freelocale’未定义的引用
stdsoap2.c:16684:对‘strtod_l’未定义的引用
stdsoap2.c:16684:对‘newlocale’未定义的引用


把stdsoap2.h中的这个定义注释掉即可:

# elif defined(__GLIBC__) || defined(__GNU__) || defined(__GNUC__)
#  define HAVE_POLL
#  define HAVE_SNPRINTF
#  define HAVE_STRRCHR
#  define HAVE_STRTOD
#  define HAVE_SSCANF
#  define HAVE_STRTOD_L
#  define HAVE_SSCANF_L
#  define HAVE_STRTOL
#  define HAVE_STRTOUL
#  define HAVE_STRTOLL
#  define HAVE_STRTOULL
#  define HAVE_GETTIMEOFDAY
#  define HAVE_SYS_TIMEB_H
#  define HAVE_FTIME
#  define HAVE_RAND_R
#  define HAVE_GMTIME_R
#  define HAVE_ASCTIME_R
#  define HAVE_LOCALTIME_R
#  define HAVE_STRERROR_R
#  define HAVE_TIMEGM
#  define HAVE_WCTOMB
#  define HAVE_MBTOWC
#  define HAVE_ISNAN
#  define HAVE_ISINF
#  if !defined(__GNUC__) || __GNUC__ >= 4 /* gcc 3 and earlier often refuse to compile _l functions */
#   define HAVE_STRTOD_L
#   define HAVE_SSCANF_L
//#   define HAVE_LOCALE_H  //注释掉解决freelocale未定义问题


2.__isnan等等未定义

stdsoap2.c:(.text+0x6194): warning: gethostbyname_r is obsolescent, use getnameinfo() instead.
/tmp/ccqD1Pz1.o: In function `soap_float2s':
stdsoap2.c:(.text+0x19a80): undefined reference to `__isnan'
stdsoap2.c:(.text+0x19ad0): undefined reference to `__isnanf'
stdsoap2.c:(.text+0x19af4): undefined reference to `__isnanf'
stdsoap2.c:(.text+0x19b44): undefined reference to `__isnanf'
stdsoap2.c:(.text+0x19b68): undefined reference to `__isnanf'
/tmp/ccqD1Pz1.o: In function `soap_double2s':
stdsoap2.c:(.text+0x1a378): undefined reference to `__isnan'
stdsoap2.c:(.text+0x1a3cc): undefined reference to `__isnan'
stdsoap2.c:(.text+0x1a3f8): undefined reference to `__isnan'
stdsoap2.c:(.text+0x1a44c): undefined reference to `__isnan'
stdsoap2.c:(.text+0x1a478): undefined reference to `__isnan'
collect2: ld returned 1 exit status


加上连接库 -lm 就可以编译通过了;

目录
相关文章
|
Java Maven Spring
类文件具有错误的版本 61.0, 应为 52.0
类文件具有错误的版本 61.0, 应为 52.0
2661 0
|
关系型数据库 MySQL PHP
PDO :: __ construct():服务器向客户端发送了未知的字符集(255)请向开发商报告
PDO :: __ construct():服务器向客户端发送了未知的字符集(255)请向开发商报告
114 0
【C#】【报错解决】分析器错误消息: 未能找到 CodeDom 提供程序类型
【C#】【报错解决】分析器错误消息: 未能找到 CodeDom 提供程序类型
451 0
【C#】【报错解决】分析器错误消息: 未能找到 CodeDom 提供程序类型
|
iOS开发
iOS - 重写set和get方法后,为什么使用时会发生无效?解析命名规范
iOS - 重写set和get方法后,为什么使用时会发生无效?解析命名规范
395 0
|
小程序 C# Python
【优化】C#小程序集成实现python定时段批量下载电子邮箱附件的bug排除
【优化】C#小程序集成实现python定时段批量下载电子邮箱附件的bug排除
103 0