在编译ZipArchive发现报了error: undefined reference to ‘deflateInit2_’,crc32等错误
如图:
问题在于没有引用zlib库。
解决方案:
在CMakeLists.txt
添加以下代码:
find_library( # Sets the name of the path variable.
z-lib
z)
target_link_libraries( # Specifies the target library.
${z-lib}
)