编译 gsoap 示例时,gSoap 错误“_set_errno”未在此范围内声明

问题描述

我正在尝试在 Windows 上使用 gsoap 2.8.111 编译“https://www.cs.fsu.edu/~engelen/quote.html”示例。但我一直低于错误。 我正在使用示例中提到的完全相同的步骤。从错误 '_set_errno' 或相关函数未找到,但这些应该是用soap 命令自动生成的。 任何指针看到错误消息可能是什么问题。

D:\Download\gsoap_2.8.111\gsoap-2.8\gsoap\bin\win64>g++ -o quote quote.c soapC.cpp soapClient.cpp stdsoap2.cpp

    

In file included from stdsoap2.cpp:65:0:
stdsoap2.cpp: In function 'SOCKET soap_accept(soaP*)':
stdsoap2.h:1156:40: error: '_set_errno' was not declared in this scope
 #  define soap_reset_errno _set_errno(0)
                                        ^
stdsoap2.cpp:7031:3: note: in expansion of macro 'soap_reset_errno'
   soap_reset_errno;
   ^~~~~~~~~~~~~~~~
stdsoap2.cpp: In function 'int soap_s2int(soaP*,const char*,int*)':
stdsoap2.h:1156:40: error: '_set_errno' was not declared in this scope
 #  define soap_reset_errno _set_errno(0)
                                        ^
stdsoap2.cpp:16173:5: note: in expansion of macro 'soap_reset_errno'
     soap_reset_errno;
     ^~~~~~~~~~~~~~~~
stdsoap2.cpp: In function 'int soap_s2long(soaP*,long int*)':
stdsoap2.h:1156:40: error: '_set_errno' was not declared in this scope
 #  define soap_reset_errno _set_errno(0)
                                        ^
stdsoap2.cpp:16272:5: note: in expansion of macro 'soap_reset_errno'
     soap_reset_errno;
     ^~~~~~~~~~~~~~~~
stdsoap2.cpp: In function 'int soap_s2LONG64(soaP*,long long int*)':
stdsoap2.h:1156:40: error: '_set_errno' was not declared in this scope
 #  define soap_reset_errno _set_errno(0)
                                        ^
stdsoap2.cpp:16367:5: note: in expansion of macro 'soap_reset_errno'
     soap_reset_errno;
     ^~~~~~~~~~~~~~~~
stdsoap2.cpp: In function 'int soap_s2unsignedInt(soaP*,unsigned int*)':
stdsoap2.h:1156:40: error: '_set_errno' was not declared in this scope
 #  define soap_reset_errno _set_errno(0)
                                        ^
stdsoap2.cpp:17165:5: note: in expansion of macro 'soap_reset_errno'
     soap_reset_errno;
     ^~~~~~~~~~~~~~~~
stdsoap2.cpp: In function 'int soap_s2unsignedLong(soaP*,long unsigned int*)':
stdsoap2.h:1156:40: error: '_set_errno' was not declared in this scope
 #  define soap_reset_errno _set_errno(0)
                                        ^
stdsoap2.cpp:17264:5: note: in expansion of macro 'soap_reset_errno'
     soap_reset_errno;
     ^~~~~~~~~~~~~~~~
stdsoap2.cpp: In function 'int soap_s2ULONG64(soaP*,long long unsigned int*)':
stdsoap2.h:1156:40: error: '_set_errno' was not declared in this scope
 #  define soap_reset_errno _set_errno(0)
                                        ^
stdsoap2.cpp:17363:5: note: in expansion of macro 'soap_reset_errno'
     soap_reset_errno;
     ^~~~~~~~~~~~~~~~
stdsoap2.cpp: In function 'int soap_try_connect_command(soaP*,int,const char*)':
stdsoap2.h:1156:40: error: '_set_errno' was not declared in this scope
 #  define soap_reset_errno _set_errno(0)
                                        ^
stdsoap2.cpp:21474:3: note: in expansion of macro 'soap_reset_errno'
   soap_reset_errno;

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)