天天看點

QRencode庫編譯系列之libpng庫編譯

QRencode 編譯依賴libzlib,libpng:

Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)

GETOPT_LIBRARIES

linked by target "qrenc" in directory E:/sparrow/code/client/sparrow_live/qrencode-4.0.0

這篇文章主要闡述png庫的編譯。

1)下載下傳png源碼 https://sourceforge.net/projects/libpng/files/libpng16/1.6.34/lpng1634.zip/download?use_mirror=jaist&download=

2)解壓源檔案,解壓出源碼 建立build檔案夾,cmake出lpng庫工程。

這時出現了問題

CMake Error at C:/Program Files/CMake/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:137 (message):

Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)

把剛剛生成的zlib加載進去就可以了

QRencode庫編譯系列之libpng庫編譯

生成了libpng庫工程

QRencode庫編譯系列之libpng庫編譯

3)打開libpng.sln

QRencode庫編譯系列之libpng庫編譯

4)這樣就生成了所需要的庫

QRencode庫編譯系列之libpng庫編譯

附加:libpng源碼,32,64位下載下傳位址 http://download.csdn.net/download/fxbjye/10186394

繼續閱讀