문제

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