c++opensslgsoaponvif

Compile gsoap-onvif solve #error: ‘M_ASN1_STRING_data’ was not declared in this scope


I'm trying to compile the gsoap-onvif project here: https://github.com/xris-hu/gsoap-onvif

I call the make file and it throws some errors. Working on ubuntu 18.10 i solved some of them installing the dependencies: g++, gsoap, libssl-dev. Unfortunately I have an error which I cannot understand:

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

Someone know how to solve this issue?

UPDATE: the version of gSOAP used in this project is pretty old and may not work with newer versions of OpenSSL. The project could be dead... Anyone knows an alternative?

ALTERNATIVE: Here is the best solution I found: https://github.com/suresecure/onvifcpplib This lib is used also in https://sourceforge.net/projects/onvifmanager/


Solution

  • It seams it is a OpenSSL/gsoap isseus, try to update the software with a new version of stdsoap2.cpp.

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