我正在尝试在 Windows 上构建 OpenEXR 2.2,但下载附带的说明没有按预期工作。IlmBase 的指令有效,但是一旦我得到 OpenEXR 指令,它就会因为 zlib 而失败。此时的步骤是:
3. Go to http://www.zlib.net and download zlib
所以我去了这个网站,在开头的部分:当前版本在这里公开可用:我下载 了zlib 源代码,版本 1.2.8,zipfile 格式......
然后,我继续下一步,这是我得到错误的地方:
4. Launch a command window, navigate to the OpenEXR folder with
CMakeLists.txt, and type command:
setlocal
del /f CMakeCache.txt
cmake
-DZLIB_ROOT=<zlib location>
-DILMBASE_PACKAGE_PREFIX=<where you installed the ilmbase builds>
-DCMAKE_INSTALL_PREFIX=<where you want to instal the openexr builds>
-G "Visual Studio 10 Win64" ^
..\openexr
所以这是我输入的命令:
cmake -DZLIB_ROOT=C:\Users\erik\Documents\zlib-1.2.8 -DILMBASE_PACKAGE_PREFIX=C:\Users\erik\Documents\ilmbase-2.2.0\bin -DCMAKE_INSTALL_PREFIX=C:\Users\erik\Documents\ilmbase-2.2.0\bin -G "Visual Studio 10 Win64" ^..\openexr-2.2.0
这是我得到的错误:
找不到 ZLIB(缺少:ZLIB_LIBRARY)(找到版本“1.2.8”)
第一个问题是,说明中没有提到 ZLIB_LIBRARY。其次,zlib 下载看起来都是源代码。不涉及 .lib 或 .dll 文件。