7

我正在尝试在 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 文件。

4

1 回答 1

3

您只下载了源代码。你需要先编译它。或者从zlib主页下载预编译的DLL:“zlib编译的DLL”。

ZLIB_LIBRARY将派生自ZLIB_DIR,所以这部分是正确的。

于 2015-04-07T05:39:26.530 回答