GSoap QT 未定义对“soap_new”的引用?
我正在尝试在 QT 中使用 gSoap。当我编译我的项目时,我得到:
undefined reference to `soap_new'
undefined reference to `soap_delete'
undefined reference to `soap_end'
undefined reference to `soap_free'
undefined reference to `soap_delete'
undefined reference to `soap_end'
undefined reference to `soap_free'
我的示例专业版包含:
INCLUDEPATH += ../../gsoap-2.8/gsoap/
LIBS += -lwsock32
知道出了什么问题吗?
我用以下内容生成了文件:
soapcpp2 -I ../../gsoap-2.8/gsoap/import -i quote.h
soapcpp2 -I ../../gsoap-2.8/gsoap/import quote.h
I'm trying to use gSoap in QT. When I compile my project I get:
undefined reference to `soap_new'
undefined reference to `soap_delete'
undefined reference to `soap_end'
undefined reference to `soap_free'
undefined reference to `soap_delete'
undefined reference to `soap_end'
undefined reference to `soap_free'
My sample pro contains:
INCLUDEPATH += ../../gsoap-2.8/gsoap/
LIBS += -lwsock32
Any idea what's wrong?
I produced file with:
soapcpp2 -I ../../gsoap-2.8/gsoap/import -i quote.h
soapcpp2 -I ../../gsoap-2.8/gsoap/import quote.h
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些函数在
sdtsoap2.c
或stdsoap2.cpp
中定义(取决于您使用的是 C 还是 C++;对于 Qt,我推断为 C++)。您必须在项目中包含
stdsoap2.cpp
或链接到libsoap++
。如果您需要传递不同的标志,例如
WITH_NONAMESPACES
,请使用第一个。如果您没有 GSOAP 的特殊配置,请使用后者。有关详细信息,请参阅 GSOAP 文档。
Those functions are defined in
sdtsoap2.c
orstdsoap2.cpp
(depending if you are using C or C++; for Qt I infer C++).You must either include
stdsoap2.cpp
in your project or link againstlibsoap++
.If you need to pass different flags like
WITH_NONAMESPACES
, use the first.If you have no special configuration for GSOAP, use the later.Look at GSOAP docs for more info.