有关cabide.c++中利用gsoap调用webservice的问题

huizibayu 2009-12-21 04:36:06
最近开始学习Symbian,想实现调用webservice,于是在网上查找资料用gosap2.7编写了一个调用webservice的客户端,按照网上的提示在工程中加入了相关的.h,.cpp文件可是编译时一直报错,而且报错的还是用gosap命令生成的soapH.h,soapStub.h,soapC.cpp,错误如下:我的环境是Carbide.c++,有没有哪位高手在Carbide.c++下用过goasp给我指导一下啊,最好详细步骤给我说一下,先谢谢各位哦
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/sys/socket.h:68: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/sys/socket.h:69: error: `u_short' does not name a type
In file included from /Symbian/Carbide/workspace/Test/inc/stdsoap2.h:588,
from /Symbian/Carbide/workspace/Test/inc/soapStub.h:11,
from /Symbian/Carbide/workspace/Test/src/testappui.cpp:28:
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/in.h:121: error: `u_char' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/in.h:122: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/in.h:123: error: `u_long' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/in.h:212: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/in.h:213: error: `u_short' does not name a type
In file included from /Symbian/Carbide/workspace/Test/inc/stdsoap2.h:592,
from /Symbian/Carbide/workspace/Test/inc/soapStub.h:11,
from /Symbian/Carbide/workspace/Test/src/testappui.cpp:28:
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:24: error: `u_long' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:31: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:32: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:33: error: `tcp_seq' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:34: error: `tcp_seq' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:39: error: `u_int' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:42: error: `u_char' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:67: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:68: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:69: error: `u_short' does not name a type
make[1]: *** [\Symbian\9.2\S60_3rd_FP1\EPOC32\BUILD\Symbian\Carbide\workspace\Test\group\TEST\GCCE\UREL\win32.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /Symbian/Carbide/workspace/Test/inc/stdsoap2.h:592,
from /Symbian/Carbide/workspace/Test/inc/soapStub.h:11,
from /Symbian/Carbide/workspace/Test/src/testappui.cpp:28:
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:90:1: warning: "TCP_NODELAY" redefined
In file included from /Symbian/Carbide/workspace/Test/inc/stdsoap2.h:588,
from /Symbian/Carbide/workspace/Test/inc/soapStub.h:11,
from /Symbian/Carbide/workspace/Test/src/testappui.cpp:28:
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/in.h:250:1: warning: this is the location of the previous definition
/Symbian/Carbide/workspace/Test/inc/soapStub.h:202: error: `std::string' has not been declared
/Symbian/Carbide/workspace/Test/inc/soapStub.h:202: error: `std::string' has not been declared
/Symbian/Carbide/workspace/Test/inc/soapStub.h:202: error: `std::string' has not been declared
/Symbian/Carbide/workspace/Test/inc/soapStub.h:204: error: `std::string' has not been declared
/Symbian/Carbide/workspace/Test/inc/soapStub.h:204: error: `std::string' has not been declared
/Symbian/Carbide/workspace/Test/inc/soapStub.h:204: error: ISO C++ forbids declaration of `_in0' with no type
/Symbian/Carbide/workspace/Test/inc/soapStub.h:204: error: ISO C++ forbids declaration of `_uploadReturn' with no type
/Symbian/Carbide/workspace/Test/inc/soapStub.h:213: error: `std::string' has not been declared
/Symbian/Carbide/workspace/Test/inc/soapStub.h:213: error: `std::string' has not been declared
/Symbian/Carbide/workspace/Test/inc/soapStub.h:213: error: ISO C++ forbids declaration of `_in0' with no type
/Symbian/Carbide/workspace/Test/inc/soapStub.h:213: error: ISO C++ forbids declaration of `_testReturn' with no type
/Symbian/Carbide/workspace/Test/src/testappui.cpp:133: error: expected primary-expression before ')' token
/Symbian/Carbide/workspace/Test/src/testappui.cpp:133: error: expected `;' before ')' token
/Symbian/Carbide/workspace/Test/src/testappui.cpp:130: warning: unused variable 'quote'
/Symbian/Carbide/workspace/Test/src/testappui.cpp:210:2: warning: #warning "Please see comment about help and UID3..."
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:42: error: `u_char' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:67: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:68: error: `u_short' does not name a type
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:69: error: `u_short' does not name a type
In file included from /Symbian/Carbide/workspace/Test/inc/stdsoap2.h:592,
from /Symbian/Carbide/workspace/Test/inc/soapStub.h:11,
from /Symbian/Carbide/workspace/Test/inc/soapH.h:10,
from /Symbian/Carbide/workspace/Test/src/soapc.cpp:13:
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/tcp.h:90:1: warning: "TCP_NODELAY" redefined
In file included from /Symbian/Carbide/workspace/Test/inc/stdsoap2.h:588,
/Symbian/9.2/S60_3rd_FP1/EPOC32/include/libc/netinet/in.h:250:1: warning: this is the location of the previous definition
In file included from /Symbian/Carbide/workspace/Test/inc/soapH.h:10,
from /Symbian/Carbide/workspace/Test/src/soapc.cpp:13:
/Symbian/Carbide/workspace/Test/inc/soapStub.h:47: error: using-declaration for non-member at class scope
been declared
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [\Symbian\9.2\S60_3rd_FP1\EPOC32\BUILD\Symbian\Carbide\workspace\Test\group\TEST\GCCE\UREL\TestAppUi.o] Error 1
In file included from /Symbian/Carbide/workspace/Test/src/soapc.cpp:13:
/Symbian/Carbide/workspace/Test/src/soapc.cpp:315: error: ISO C++ forbids declaration of `type name' with no type
/Symbian/Carbide/workspace/Test/src/soapc.cpp:315: error: ISO C++ forbids declaration of `type name' with no type
/Symbian/Carbide/workspace/Test/src/soapc.cpp:1329: error: 'struct ns1__upload' has no member named '_in0'
/Symbian/Carbide/workspace/Test/src/soapc.cpp: In function `void soap_serialize_ns1__upload(soap*, const ns1__upload*)':
make[1]: *** [\Symbian\9.2\S60_3rd_FP1\EPOC32\BUILD\Symbian\Carbide\workspace\Test\group\TEST\GCCE\UREL\soapC.o] Error 1
make: *** [TARGETTEST] Error 2
...全文
440 11 打赏 收藏 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
平凡与不凡 2010-07-26
  • 打赏
  • 举报
回复
学习啦
du576648215 2010-07-26
  • 打赏
  • 举报
回复
楼主太牛了,回答的太好了,顶你!
huizibayu 2009-12-26
  • 打赏
  • 举报
回复
问题基本解决了,在选择模拟方式时选择Emulator Debug(WINSCW),运行时就不会报错,但会出现警告,用Phone Debug(GCCE)时又会报上面的错误,本人初学完全不懂为什么,现在能运行了总算有了一点小进步吧,谢谢楼上各位的回帖哦
connect_007 2009-12-25
  • 打赏
  • 举报
回复
恩,你那个报ymbian/Carbide/workspace/Test/inc/soapStub.h:202: error: `std::string' has not been declared 错
肯定是没有放在include 下面,我也遇到过,后来好了
huizibayu 2009-12-25
  • 打赏
  • 举报
回复
我只是把生成的文件拷进去,什么也不做编译一下都会报错:/Symbian/Carbide/workspace/TestWebservice/src/testwebserviceappui.cpp:191:2: warning: #warning "Please see comment about help and UID3..."
/Symbian/Carbide/workspace/TestWebservice/src/stdsoap2.cpp: In function `long int soap_code_bits(const soap_code_map*, const char*)':
/Symbian/Carbide/workspace/TestWebservice/src/stdsoap2.cpp:1221: warning: comparison is always true due to limited range of data type
/Symbian/Carbide/workspace/TestWebservice/src/stdsoap2.cpp: In function `const char* soap_value(soap*)':
/Symbian/Carbide/workspace/TestWebservice/src/stdsoap2.cpp:10295: warning: comparison is always true due to limited range of data type
/Symbian/Carbide/workspace/TestWebservice/src/stdsoap2.cpp: In function `int soap_getmimehdr(soap*)':
/Symbian/Carbide/workspace/TestWebservice/src/stdsoap2.cpp:10782: warning: comparison is always true due to limited range of data type
/Symbian/Carbide/workspace/TestWebservice/src/stdsoap2.cpp: In function `int http_parse(soap*)':
/Symbian/Carbide/workspace/TestWebservice/src/stdsoap2.cpp:12232: warning: comparison is always true due to limited range of data type
arm-none-symbianelf-ld: \Symbian\9.2\S60_3rd_FP1\EPOC32\RELEASE\ARMV5\LIB\eexe.dso: No such file: No such file or directory
huizibayu 2009-12-25
  • 打赏
  • 举报
回复
想问一下楼上要用gosap连接webservice除了必须的那些文件拷到工程中之外,mmp文件需要如何修改啊?
huizibayu 2009-12-24
  • 打赏
  • 举报
回复
谢谢楼上,现在原来的错误不报了可是又报了下面的错误:
arm-none-symbianelf-ld: \Symbian\9.2\S60_3rd_FP1\EPOC32\RELEASE\ARMV5\LIB\eexe.dso: No such file: No such file or directory
make[1]: *** [\Symbian\9.2\S60_3rd_FP1\EPOC32\RELEASE\GCCE\UDEB\webservice_0xE978B667.exe] Error 1
make: *** [TARGETWEBSERVICE] Error 2
请问一下楼上有没有遇到过啊,ecrt0.lib eikctl.lib eexe.lib 都是新加的库,他们本身就不存在.dso文件啊,为什么一直会出现这样的错误啊
huizibayu 2009-12-24
  • 打赏
  • 举报
回复
楼上说的相关的文件指的是相关的库吗?我调的那些库都是include底下的啊
connect_007 2009-12-24
  • 打赏
  • 举报
回复
你需要把inc下的相关的文件COPY到 :\Symbian\9.1\S60_3rd\Epoc32\include 下
  • 打赏
  • 举报
回复
http://hi.csdn.net/link.php?url=http://blog.csdn.net%2Factual_

bsr2009 2009-12-22
  • 打赏
  • 举报
回复
这些跟加一个开源项目到VC工程一样,看它原来的类型是哪一种,在symbian中用相应的替代就可以了。

3,119

社区成员

发帖
与我相关
我的任务
社区描述
塞班系统(Symbian系统)是塞班公司为手机而设计的操作系统,它的前身是英国宝意昂公司的 EP ( Electronic Piece of cheese)操作系统。
社区管理员
  • Symbian社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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