[英]Error in installing libpng for windows x64
我嘗試從http://libpng.org/pub/png/libpng.html安裝並重新安裝libpng
。 我需要使用它來使用bob (由python托管)進行面部驗證。 我按照第一步通過此答案安裝libzip
和ziplib
。 但是我一直在出錯。
在這里,我列出了cmake
的結果:
-- Building for: Visual Studio 14 2015
-- Found ZLIB: c:/Python27/work/libpng-1.6.26/lib/zlib.lib (found version "1.2.8")
-- Performing Test HAVE_LD_VERSION_SCRIPT
-- Performing Test HAVE_LD_VERSION_SCRIPT - Failed
-- Performing Test HAVE_SOLARIS_LD_VERSION_SCRIPT
-- Performing Test HAVE_SOLARIS_LD_VERSION_SCRIPT - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Python27/work/libpng-1.6.26/libpng-1.6.26
然后,這是我在構建libpng.sln
時得到的:
Severity Code Description Project File Line Suppression State
Warning MSB8028 The intermediate directory (x64\Debug\) contains files shared from another project (png.vcxproj, pngfix.vcxproj, pngimage.vcxproj, pngstest.vcxproj, pngtest.vcxproj, pngunknown.vcxproj, pngvalid.vcxproj, png_static.vcxproj). This can lead to incorrect clean and rebuild behavior. png-fix-itxt C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 392
Warning MSB8028 The intermediate directory (x64\Debug\) contains files shared from another project (png-fix-itxt.vcxproj, pngfix.vcxproj, pngimage.vcxproj, pngstest.vcxproj, pngtest.vcxproj, pngunknown.vcxproj, pngvalid.vcxproj, png_static.vcxproj). This can lead to incorrect clean and rebuild behavior. png C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 392
Error LNK1112 module machine type 'x64' conflicts with target machine type 'X86' png C:\Python27\work\libpng-1.6.26\libpng-1.6.26\x64\Debug\png.obj 1
Error LNK1112 module machine type 'x64' conflicts with target machine type 'X86' png-fix-itxt C:\Python27\work\libpng-1.6.26\libpng-1.6.26\x64\Debug\png-fix-itxt.obj 1
Warning MSB8028 The intermediate directory (x64\Debug\) contains files shared from another project (png-fix-itxt.vcxproj, png.vcxproj, pngfix.vcxproj, pngstest.vcxproj, pngtest.vcxproj, pngunknown.vcxproj, pngvalid.vcxproj, png_static.vcxproj). This can lead to incorrect clean and rebuild behavior. pngimage C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 392
Warning MSB8028 The intermediate directory (x64\Debug\) contains files shared from another project (png-fix-itxt.vcxproj, png.vcxproj, pngimage.vcxproj, pngstest.vcxproj, pngtest.vcxproj, pngunknown.vcxproj, pngvalid.vcxproj, png_static.vcxproj). This can lead to incorrect clean and rebuild behavior. pngfix C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 392
Warning MSB8028 The intermediate directory (x64\Debug\) contains files shared from another project (png-fix-itxt.vcxproj, png.vcxproj, pngfix.vcxproj, pngimage.vcxproj, pngstest.vcxproj, pngtest.vcxproj, pngvalid.vcxproj, png_static.vcxproj). This can lead to incorrect clean and rebuild behavior. pngunknown C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 392
Error LNK1104 cannot open file 'Debug\libpng16d.lib' pngimage C:\Python27\work\libpng-1.6.26\libpng-1.6.26\LINK 1
Error LNK1104 cannot open file 'Debug\libpng16d.lib' pngunknown C:\Python27\work\libpng-1.6.26\libpng-1.6.26\LINK 1
Error LNK1104 cannot open file 'Debug\libpng16d.lib' pngfix C:\Python27\work\libpng-1.6.26\libpng-1.6.26\LINK 1
Warning MSB8028 The intermediate directory (x64\Debug\) contains files shared from another project (png-fix-itxt.vcxproj, png.vcxproj, pngfix.vcxproj, pngimage.vcxproj, pngtest.vcxproj, pngunknown.vcxproj, pngvalid.vcxproj, png_static.vcxproj). This can lead to incorrect clean and rebuild behavior. pngstest C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 392
Warning MSB8028 The intermediate directory (x64\Debug\) contains files shared from another project (png-fix-itxt.vcxproj, png.vcxproj, pngfix.vcxproj, pngimage.vcxproj, pngstest.vcxproj, pngtest.vcxproj, pngunknown.vcxproj, png_static.vcxproj). This can lead to incorrect clean and rebuild behavior. pngvalid C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 392
Warning MSB8028 The intermediate directory (x64\Debug\) contains files shared from another project (png-fix-itxt.vcxproj, png.vcxproj, pngfix.vcxproj, pngimage.vcxproj, pngstest.vcxproj, pngunknown.vcxproj, pngvalid.vcxproj, png_static.vcxproj). This can lead to incorrect clean and rebuild behavior. pngtest C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets 392
Error LNK1104 cannot open file 'Debug\libpng16d.lib' pngvalid C:\Python27\work\libpng-1.6.26\libpng-1.6.26\LINK 1
Error LNK1104 cannot open file 'Debug\libpng16d.lib' pngtest C:\Python27\work\libpng-1.6.26\libpng-1.6.26\LINK 1
Error LNK1104 cannot open file 'Debug\libpng16d.lib' pngstest C:\Python27\work\libpng-1.6.26\libpng-1.6.26\LINK 1
據我所知,我應該處理的是x64版本。 而且看起來cmake
不能正確執行。 但是我對如何解決它一無所知。
我剛剛按照該答案中的步驟成功安裝了libpng。我認為您沒有正確安裝它,因為一旦我安裝不正確,我就會看到這些結果。
-執行測試HAVE_LD_VERSION_SCRIPT
-執行測試HAVE_LD_VERSION_SCRIPT-失敗
-執行測試HAVE_SOLARIS_LD_VERSION_SCRIPT
-執行測試HAVE_SOLARIS_LD_VERSION_SCRIPT-失敗
之后,我發現選擇CMAKE_INSTALL_PREFIX和libzip的CMAKE_PREFIX_PATH時出錯。 請注意,zlib和libzip應該安裝在同一路徑中。 並且libpng應該安裝在與前一個路徑相同的路徑中。
您確定使用CMake選擇了正確的生成器嗎? 據我所知,如果要構建64位二進制文件,則需要選擇“ Visual Studio 14 2015 Win64”作為目標名稱。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.