Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在我的 Qt 应用程序中探索 QuaZIP 库。我将 quazip.h 包含在 mainwindow.h 和 mainwindow.cpp 中(我通过自动完成获得包含,因此它们对于子文件夹是正确的),我将 quazip.h 放在 PRO 文件的标题中。但是,如果我尝试在主窗口代码中使用 QuaZip 类,我会在构建时收到“未定义的引用”错误。问题是什么?
编辑:还有一个“错误:对`gzopen'的未定义引用”错误。
您还需要链接到 .pro 文件中的库:
LIBS += -lquazip -lz
Iget 错误:找不到 -lquazip。我将源添加为 .pri 文件。