我正在尝试在这里编译 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/