c++ - 编译gsoap-onvif解决#error : ‘M_ASN1_STRING_data’ was not declared in this scope

标签 c++ openssl gsoap onvif

我正在尝试在这里编译 gsoap-onvif 项目:https://github.com/xris-hu/gsoap-onvif

我调用了 make 文件,它抛出了一些错误。在 ubuntu 18.10 上工作,我解决了其中一些安装依赖项的问题:g++、gsoap、libssl-dev。 不幸的是我有一个我无法理解的错误:

admin@UbuntuOS:~/Desktop/gsoap-onvif-master$ make
g++ -c -Wall -g -w -fPIC -DWITH_NONAMESPACES -fno-use-cxa-atexit -fexceptions -DWITH_DOM  -DWITH_OPENSSL -DSOAP_DEBUG   -I./include -I. stdsoap2.cpp -o stdsoap2.o
stdsoap2.cpp: In function ‘int tcp_connect(soap*, const char*, const char*, int)’:
stdsoap2.cpp:4406:52: error: ‘M_ASN1_STRING_data’ was not declared in this scope
             { if (!soap_tag_cmp(host, (const char*)M_ASN1_STRING_data(name)))
                                                    ^~~~~~~~~~~~~~~~~~
stdsoap2.cpp:4406:52: note: suggested alternative: ‘ASN1_STRING_data’
             { if (!soap_tag_cmp(host, (const char*)M_ASN1_STRING_data(name)))
                                                    ^~~~~~~~~~~~~~~~~~
                                                    ASN1_STRING_data
make: *** [Makefile:22: stdsoap2.o] Error 1

有人知道如何解决这个问题吗?

更新:此项目中使用的 gSOAP 版本很旧,可能无法与较新版本的 OpenSSL 一起使用。 该项目可能已经死了...有人知道替代方案吗?

备选方案:这是我找到的最佳解决方案:https://github.com/suresecure/onvifcpplib 此库也用于 https://sourceforge.net/projects/onvifmanager/

最佳答案

它似乎是一个 OpenSSL/gsoap isseus,尝试用新版本的 stdsoap2.cpp 更新软件。

https://github.com/Sufi-Al-Hussaini/onvif-gsoap-by-example/issues/1

关于c++ - 编译gsoap-onvif解决#error : ‘M_ASN1_STRING_data’ was not declared in this scope,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55394792/

相关文章:

OpenSSL -aes-256-cbc 解密行为在 1.0.2o 和 1.1.0g 之间发生了变化

mysql - 如何从 MySQL .NET Connector 使用 SSL 访问托管在 Amazon RDS 上的 MySQL 数据库

c++ - 将 C DLL 的函数导入 C++ 程序

c++ - MFC主线程只关注Dialog,需要处理从服务器接收到的数据

c++ - 你最喜欢的 C++ 编码风格习语是什么

c++ - 如何打印 uint64_t?失败,出现 : "spurious trailing ‘%’ in format"

ssl - 连接到 gateway.sandbox.push.apple.com 时为 "verify error:num=20"

c++ - gSOAP命名空间前缀问题

c++ - 使用 gSOAP 解析 soap 消息