网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Cygwin下编译gsoap2.8.46-创新互联

引:

十载的南岔网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都营销网站建设的优势是能够根据用户设备显示端的尺寸不同,自动调整南岔建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联建站从事“南岔网站设计”,“南岔网站推广”以来,每个客户项目都认真落实执行。

 现用的gsoap版本是2.7版本,gsoap代码在sourceforge上维护,版本维护工具是SVN。gsoap 2.7有多个小版本,最新的是2.7.17。这个2.7.17版本sf页面,显示的最后修改时间是2016-09-22,点进去后,看到的gsoap_2.7.17.zip的最后修改时间是1010-05-09,这个可能是版本文件夹创建于2016-09-22。OK,扯远了,现在要说的是。综合各种现象判断gsoap2.7是基于openssl 1.0以前的版本,依赖于BIO结构。而openssl自1.0及以后的版本,不在公开BIO的结构,将该结构隐藏起来。凡是外部引用BIO结构的APP或者库,就会报告这个BIO类型的变量size不确定,原因就是openssl 1.0以后BIO结构的声明不再存在于openssl公开的头文件里了。这个东西只是在openssl的changes(相当于release notes)文件里说明了下,官方的文档并没有指出来。而后来爆出来的openssl 0.98及以前的版本存在严重漏洞,会使***者获得ssl加密的明文,所以如果要使用ssl加密业务交互重的数据,就要升级到openssl 0.98以上,在openssl官方公布的版本里,0.98以上就是1.0及以上。

 综合以上问题,gsoap的2.7版本基本上要被弃用了,要转入到gsoap 2.8版本。今天要做的事情,就是建立gsoap 2.8 + openssl 1.1.0e的体系支持。openssl 1.1.0e的编译前文章已经有叙述解决,本文就gsoap 2.8的编译就以说明。

1.准备
 gsoap2.8.46的版本功能增强,依赖的包也相对较多。采用cygwin 32来编译gsoap至少需要以下工具及库:
1)flex develop
2)yacc develop
3)openssl 1.1.0e

2.编译配置
 本次的目标是生成cygwin 32里可运行的gsoap工具,如下:
 soapcpp2.exe wsdl2h.exe
 所以配置就在cygwin里默认。
 #./configure --prefix=/usr/local/gsoap-utils
 然后就是需要修改gsoap-2.8/config.h的文件,gsoap的配置工具在检测strtod_l/strtof_l等函数的可用性,和make会有不一致的问题。配置工具检测使用gcc去检测,检测到strtod_l/strtof_l函数,只会报告warning,说此函数是隐式声明。而在编译时,用的g++去编译,就会报错,说‘strtod_l’在此作用域中尚未声明。这个是gcc和g++编译器的差异。根本原因在于stdlib.h确实有声明这个函数,libc库确实有这个函数实现,但是stdlib里的声明上却有一个宏来控制,如下:
 #if __GNU_VISIBLE
 double strtod_l (const char *__restrict, char **__restrict, locale_t);
 float strtof_l (const char *__restrict, char **__restrict, locale_t);
 而__GNU_VISIBLE又受__GNU_SOURCE的控制,而在编译时,这个宏默认是不打开的,所以就产生了有定义无声明,gcc检测有,g++编译报错的问题。
那么解决这个问题的方法就是,修改gcc检测根据监测结果后生成的config.h,将这个文件里的对应的声明修改。如下:
 #define HAVE_STRTOD_L 1
 修改为
 //#define HAVE_STRTOD_L 1

 #define HAVE_STRTOF_L 1
 修改为
 //#define HAVE_STRTOF_L 1

 #define HAVE_STRTOLD_L 1
 修改为
 //#define HAVE_STRTOLD_L 1

3.编译安装
 #make
 #make install
 make install会将对应的工具安装到--prefixc参数指定的目录/usr/local/gsoap-utils。

附生成后gsoap SDK。

raynard.wang@cmp_cpyb01 /usr/local/gsoap-utils
$ du -a
1392 ./bin/soapcpp2.exe
15836 ./bin/wsdl2h.exe
17228 ./bin
148 ./include/stdsoap2.h
148 ./include
908 ./lib/libgsoap++.a
564 ./lib/libgsoap.a
948 ./lib/libgsoapck++.a
596 ./lib/libgsoapck.a
1016 ./lib/libgsoapssl++.a
656 ./lib/libgsoapssl.a
1 ./lib/pkgconfig/gsoap++.pc
1 ./lib/pkgconfig/gsoap.pc
1 ./lib/pkgconfig/gsoapck++.pc
1 ./lib/pkgconfig/gsoapck.pc
1 ./lib/pkgconfig/gsoapssl++.pc
1 ./lib/pkgconfig/gsoapssl.pc
10 ./lib/pkgconfig
4702 ./lib
12 ./share/gsoap/custom/chrono_duration.cpp
4 ./share/gsoap/custom/chrono_duration.h
8 ./share/gsoap/custom/chrono_time_point.cpp
4 ./share/gsoap/custom/chrono_time_point.h
8 ./share/gsoap/custom/duration.c
4 ./share/gsoap/custom/duration.h
8 ./share/gsoap/custom/float128.c
4 ./share/gsoap/custom/float128.h
8 ./share/gsoap/custom/int128.c
4 ./share/gsoap/custom/int128.h
8 ./share/gsoap/custom/long_double.c
4 ./share/gsoap/custom/long_double.h
8 ./share/gsoap/custom/long_time.c
4 ./share/gsoap/custom/long_time.h
8 ./share/gsoap/custom/qbytearray_base64.cpp
4 ./share/gsoap/custom/qbytearray_base64.h
8 ./share/gsoap/custom/qbytearray_hex.cpp
4 ./share/gsoap/custom/qbytearray_hex.h
8 ./share/gsoap/custom/qdate.cpp
4 ./share/gsoap/custom/qdate.h
8 ./share/gsoap/custom/qdatetime.cpp
4 ./share/gsoap/custom/qdatetime.h
8 ./share/gsoap/custom/qstring.cpp
4 ./share/gsoap/custom/qstring.h
8 ./share/gsoap/custom/qtime.cpp
4 ./share/gsoap/custom/qtime.h
8 ./share/gsoap/custom/README.txt
8 ./share/gsoap/custom/struct_timeval.c
4 ./share/gsoap/custom/struct_timeval.h
8 ./share/gsoap/custom/struct_tm.c
8 ./share/gsoap/custom/struct_tm.h
8 ./share/gsoap/custom/struct_tm_date.c
4 ./share/gsoap/custom/struct_tm_date.h
216 ./share/gsoap/custom
4 ./share/gsoap/extras/ckdb.c
4 ./share/gsoap/extras/ckdb.h
4 ./share/gsoap/extras/ckdbtest.c
1 ./share/gsoap/extras/ckdbtest.h
4 ./share/gsoap/extras/fault.cpp
4 ./share/gsoap/extras/logging.cpp
1 ./share/gsoap/extras/README.txt
4 ./share/gsoap/extras/soapdefs.h
30 ./share/gsoap/extras
4 ./share/gsoap/import/c14n.h
4 ./share/gsoap/import/dom.h
20 ./share/gsoap/import/ds.h
20 ./share/gsoap/import/ds2.h
4 ./share/gsoap/import/plnk.h
4 ./share/gsoap/import/README.txt
4 ./share/gsoap/import/ref.h
80 ./share/gsoap/import/saml1.h
96 ./share/gsoap/import/saml2.h
1 ./share/gsoap/import/ser.h
4 ./share/gsoap/import/soap12.h
4 ./share/gsoap/import/stdstring.h
4 ./share/gsoap/import/stl.h
4 ./share/gsoap/import/stldeque.h
4 ./share/gsoap/import/stllist.h
4 ./share/gsoap/import/stlset.h
4 ./share/gsoap/import/stlvector.h
4 ./share/gsoap/import/vprop.h
4 ./share/gsoap/import/WS-example.c
4 ./share/gsoap/import/WS-example.h
4 ./share/gsoap/import/WS-Header.h

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


新闻名称:Cygwin下编译gsoap2.8.46-创新互联
文章来源:http://bjjierui.cn/article/dsjgoh.html

其他资讯