我用gsoap生成头文件时出现以下错误,并发现生成的头文件为0字节

aaaa9814 2012-02-09 07:56:55
aaaa@aaaa-desktop:~/Downloads/gsoap-2.8/gsoap/bin/linux386$ ./wsdl2h -o outfile.h http://www.bluerox.com/test/server.php?wsdl

** The gSOAP WSDL/Schema processor for C and C++, wsdl2h release 2.8.6
** Copyright (C) 2000-2011 Robert van Engelen, Genivia Inc.
** All Rights Reserved. This product is provided "as is", without any warranty.
** The wsdl2h tool is released under one of the following two licenses:
** GPL or the commercial license by Genivia Inc. Use option -l for details.

Saving outfile.h

Cannot open file 'typemap.dat'
Problem reading type map file 'typemap.dat'.
Using internal type definitions for C++ instead.


Connecting to 'http://www.bluerox.com/test/server.php?wsdl' to retrieve WSDL/XSD...
wsdl2h: relocation error: /lib/libnss_mdns4_minimal.so.2: symbol strlen, version GLIBC_2.0 not defined in file libc.so.6 with link time reference


红色部分是错误信息,我是根据wsdl文件生成头文件,但总是不成功, 绿色部分是执行命令
...全文
314 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
achilleslemon 2012-12-27
  • 打赏
  • 举报
回复
A typemap.dat file for wsdl2h contains custom XML Schema and C/C++ type bindings. An internal table is used by default. An example typemap file is: # This file contains custom definitions of the XML Schema types and # C/C++ types for your project, and XML namespace prefix definitions. # The wsdl2h WSDL importer consults this file to determine bindings. [ // This comment will be included in the generated .h file // You can include any additional declarations, includes, imports, etc. // within [ ] sections. The brackets MUST appear at the start of a line ] # XML namespace prefix definitions can be provided to override the # default choice of ns1, ns2, ... prefixes. For example: i = "http://www.soapinterop.org/" s = "http://www.soapinterop.org/xsd" # Type definitions are of the form: # type = declaration | use | pointer-use # where # type is the XML Schema type (or an application type in a namespace # that has a prefix definition given as above). 50 # declaration is an optional C/C++ type declaration # use is how the type is referred to in code # pointer-use is how the type should be referred to as a pointer (opt) # Example XML Schema and C/C++ type bindings: xsd int = | int xsd string = | char* | char* xsd boolean = enum xsd boolean false , true ; | enum xsd boolean xsd base64Binary = class xsd base64Binary unsigned char * ptr; int size; ; | xsd base64Binary | xsd base64Binary # You can extend structs and classes with member data and functions. # For example, adding a constructor to ns myClass: ns myClass = $ ns myClass(); # The general form is # class name = $ member; The i and s prefixes are declared such that the header file output by the WSDL parser will use these to produce C/C++ code. XML Schema types are associated with an optional C/C++ type declaration, a use reference, and a pointer-use reference. The pointer-use reference of the xsd byte type for example, is int* because char* is reserved for strings.
小鸟向前飞 2012-12-10
  • 打赏
  • 举报
回复
我也遇到这个问题了 顺便问一下 ./wsdl2h -o outfile.h http://www.bluerox.com/test/server.php?wsdl 是什么 该怎么理解?我在win平台下使用
luciferisnotsatan 2012-02-10
  • 打赏
  • 举报
回复
Cannot open file 'typemap.dat'
typemap.dat 这个文件是什么?
程序员小迷 2012-02-10
  • 打赏
  • 举报
回复
看这个意思,链接错误,是strlen函数没有在libc.so.6中定义

64,669

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧