I am trying to explore QuaZIP library in my Qt application. I put the quazip.h include in mainwindow.h and in mainwindow.cpp (I get the includes by auto-completion so they are right in regard to subfolders), I put quazip.h among headers in the PRO file. But if I try to consume the QuaZip class in mainwindow code I get "undefined reference to" errors when building. What is the problem?

Edit: there is also a "error: undefined reference to `gzopen'" error.

有帮助吗?

解决方案

You also need to link against the library in your .pro file:

LIBS += -lquazip -lz

其他提示

Iget error: cannot find -lquazip. I add sources as .pri file.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top