GSoap QT 未定义对“soap_new”的引用?

发布于 2024-11-04 17:43:52 字数 581 浏览 4 评论 0原文

我正在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

盗琴音 2024-11-11 17:43:52

这些函数在 sdtsoap2.cstdsoap2.cpp 中定义(取决于您使用的是 C 还是 C++;对于 Qt,我推断为 C++)。

您必须在项目中包含 stdsoap2.cpp 或链接到 libsoap++

如果您需要传递不同的标志,例如 WITH_NONAMESPACES,请使用第一个。如果您没有 GSOAP 的特殊配置,请使用后者。

有关详细信息,请参阅 GSOAP 文档。

Those functions are defined in sdtsoap2.c or stdsoap2.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 against libsoap++.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文