Xerces 库和 Qt

发布于 2024-10-02 08:29:28 字数 137 浏览 11 评论 0原文

我正在尝试设置 xerces,以便我可以在 Windows 版 Qt Creator 中使用它。

Qt 是否支持 windows/linux 二进制文件,或者我是否必须使用 mingw 作为目标来编译它?如何在 Windows 中编译这些库?

I'm trying to setup xerces so that I can use it in Qt Creator for Windows.

Does Qt support windows/linux binaries or do I have to compile it using mingw as a target? How one goes about compiling those libraries in Windows?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

分开我的手 2024-10-09 08:29:29

不可以,您不能在 Windows 下使用为 Linux 编译的库。您必须自己构建它或使用现有的 Windows 二进制发行版。具体如何工作取决于您要使用的第三方库。如果您必须自己构建它,基本选项是:在 Windows 下使用 MSVC 构建它,在 Windows 下使用 mingw 构建它,或者在 Linux 等环境下使用 mingw 交叉编译它。 MSVC 在 Windows 下往往不会那么麻烦,但 mingw 可能也能工作。

重要:当涉及到 C++ 库时,mingw 和 MSVC 与 ABI 不兼容。您不能在 mingw-Qt 项目中使用 MSVC 构建的 xerces,或者在 MSVC 项目中使用 mingw-Xerces。这只影响 C++ 库,而不影响纯 C 库。

No, you can't use libraries compiled for Linux under Windows. You'll have to either build it yourself or use existing Windows binary distribution. How that works in detail depends on the third-party library you want to use. The basic options are, in case you have to build it yourself: build it with MSVC under Windows, with mingw under Windows, or cross-compile it with mingw from e.g. Linux. MSVC tends to be less hassle under Windows, but mingw might just work as well.

Important: mingw and MSVC are ABI-incompatible when it comes to C++ libraries. You can't use e.g. a MSVC-built xerces in your mingw-Qt project, or a mingw-Xerces in an MSVC project. That only affects C++ libraries, not pure C ones.

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