Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am using QuaZip library, which has zlib dependency. I want to compile my CMake managed application under Archlinux and Windows 7, in both I have Qt 5.3.0 installed.

On Linux:

I have read here "how to add zlib to an existing qt installation" that zlib is a native part of Qt installation. But in archlinux there is no such directory. Of cause I searched through all other Qt include directories including QtCore, but there was no sign of zlib. On the other hand system installation of zlib can be found on archlinux through FindZLIB.cmake module.

On Windows:

In the Windows installation of Qt there is QtZlib folder in Qt include directory, so it can be included. Nevertheless, compiler always complain that he cannot link zlib functions from library, error log here. I've also tried to set external zlib library manually through TARGET_LINK_LIBRARIES but with no success.

Have anybody experiance with linking Zlib under Qt5 using CMake ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
474 views
Welcome To Ask or Share your Answers For Others

1 Answer

Qt's zlib is an internal implementation detail. You're not supposed to use it. You need to link your own copy of zlib, just as you would need to if you weren't using Qt at all.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...