Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/135.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Windows上的CMake zlib依赖项错误_C++_Cmake_Zlib_Openexr - Fatal编程技术网

C++ Windows上的CMake zlib依赖项错误

C++ Windows上的CMake zlib依赖项错误,c++,cmake,zlib,openexr,C++,Cmake,Zlib,Openexr,我正在尝试在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 comman

我正在尝试在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
下面是我得到的错误:

找不到ZLIB(缺少:ZLIB_库)(找到版本“1.2.8”)


第一个问题是,说明中没有提到任何关于ZLIB_库的内容。其次,zlib下载看起来像是所有的源代码。没有涉及.lib或.dll文件。

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


ZLIB\u库
将从
ZLIB\u目录
派生,因此此部分是正确的。

因此步骤3.5:构建ZLIB,然后将ZLIB\u根设置为构建目录。
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