如何将 zlib 添加到 Qt 的现有安装中.我在这方面很新,所以请给我详细的描述!提前感谢您的帮助!
How can I add zlib to an existing installation of Qt. I m pretty new in this so please give me detailed description! Thanks for your help in advance!
zlib 包含在核心 Qt 库中.如果你想在 Qt 程序中使用 zlib 函数,你只需要包含在 src/3rdparty/zlib 中的 zlib.h.见例如src/corelib/tools 中 QByteArray 的实现.
zlib is contained in the core Qt libraries. If you want to use the zlib functions in a Qt program, you only have to include zlib.h which is in src/3rdparty/zlib. See e.g. the implementation of QByteArray in src/corelib/tools.
如果您想使用 quazip,只需将库添加到您的项目中.它基于 Qt 库.注意构建与您的 Qt 安装相对应的正确 qyazip 库.
If you want to use quazip, just add the library to your project. It is based on the Qt libraries. Take care to build the correct qyazip library that corresponds to your Qt installation.
通过将以下行添加到项目文件中,您可以获得正确的包含路径:
You get the correct include path by adding the following line to your project file:
INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
对于 Qt5,请参阅 Thorbjørn 的评论:使用 #include 就足够了.
For Qt5, see Thorbjørn's comment: it is sufficient to use #include <QtZlib/zlib.h>.
这篇关于如何将 zlib 添加到现有的 qt 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何在 C++ 中读取和操作 CSV 文件数据?How can I read and manipulate CSV file data in C++?(如何在 C++ 中读取和操作 CSV 文件数据?)
在 C++ 中,为什么我不能像这样编写 for() 循环:In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,为什么我不能像这样编写 for() 循环: for(
OpenMP 如何处理嵌套循环?How does OpenMP handle nested loops?(OpenMP 如何处理嵌套循环?)
在循环 C++ 中重用线程Reusing thread in loop c++(在循环 C++ 中重用线程)
需要精确的线程睡眠.最大 1ms 误差Precise thread sleep needed. Max 1ms error(需要精确的线程睡眠.最大 1ms 误差)
是否需要“do {...} while ()"?环形?Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?环形?)