我在使用OpenEXR为windows 7构建CMake时遇到了问题。
我按照这里描述的方向
运行cmake命令后的cmd输出如下:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
D:\openexr-2.2.0>setlocal
D:\openexr-2.2.0>cmake -DZLIB_ROOT="C:\Program Files\zlib" -DILMBASE_PACKAGE_PREFIX="d:\ilmbase-2.2.0\builds" -DCMAKE_INSTALL_PREFIX="d:\openexr-2.2.0" -G "Visual Studio 10 Win64" ..\openexr-2.2.0
-- The C compiler identification is MSVC 16.0.40219.1
-- The CXX compiler identification is MSVC 16.0.40219.1
-- Check for working C compiler using: Visual Studio 10 Win64
-- Check for working C compiler using: Visual Studio 10 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10 Win64
-- Check for working CXX compiler using: Visual Studio 10 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found ZLIB: C:/Program Files/zlib/lib/zlib.lib (found version "1.2.8")
ILMBASE_PACKAGE_PREFIX = d:\ilmbase-2.2.0\builds
-- Performing Test HAVE_GCC_INLINE_ASM_AVX
-- Performing Test HAVE_GCC_INLINE_ASM_AVX - Failed
-- Performing Test HAVE_SYSCONF_NPROCESSORS_ONLN
-- Performing Test HAVE_SYSCONF_NPROCESSORS_ONLN - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: D:/openexr-2.2.0
D:\openexr-2.2.0>然而,这会为许多项目生成解决方案,但是,试图构建项目ALL_BUILDS的尝试会失败。
我注意到所有未编译的项目(除了porject ilmimf)都在抱怨。
error LNK1181: cannot open input file '..\IlmImf\Release\IlmImf-2_2.lib'试图独立构建项目IlmImf报告:
error MSB6006: "cmd.exe" exited with code -1073741515.下面是项目ilmimf的完整输出:
1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
1>Build started 06/11/2014 09:43:21.
1>InitializeBuildStatus:
1> Creating "x64\Release\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>FinalizeBuildStatus:
1> Deleting file "x64\Release\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild".
1> Touching "x64\Release\ZERO_CHECK\ZERO_CHECK.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.04
2>------ Build started: Project: IlmImf, Configuration: Release x64 ------
2>Build started 06/11/2014 09:43:21.
2>InitializeBuildStatus:
2> Touching "IlmImf.dir\Release\IlmImf.unsuccessfulbuild".
2>CustomBuild:
2> Building Custom Rule D:/openexr-2.2.0/IlmImf/CMakeLists.txt
2> CMake does not need to re-run because D:\openexr-2.2.0\IlmImf\CMakeFiles\generate.stamp is up-to-date.
2> Generating b44ExpLogTable.h
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code -1073741515.
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:00.14
========== Build: 1 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========注意,我正在以管理员模式运行cmd和Visual 2010,尝试编译所有配置(调试、发布、MinSizeRel、RelWithDebInfo),但到目前为止都没有工作。
发布于 2014-11-19 13:43:09
虽然为win32编译,但我也遇到了同样的问题。它需要在构建dll_s后创建的lib目录中使用_ilmbase。因此,我的解决方案是将该文件夹添加到windows的系统路径中,所有操作都很好。
发布于 2016-07-25 01:41:29
Error LNK1104 cannot open file '..\IlmImf\Debug\IlmImf-2_2.lib'
Error LNK1104 cannot open file '..\IlmImfUtil\Debug\IlmImfUtil-2_2.lib'我也遇到了同样的问题,我只是将Half.dll、Iex-2_2.dll和IlmThread-2_2.dll (由ilmbase生成的三个dll文件)复制到b44ExpLogTable.exe文件夹中。然后我成功地建立了openexr。
发布于 2016-06-10 08:28:04
当构建IlmImf时,它将生成一个"b44ExpLogTable.exe“程序来生成一个头文件。这个程序b44ExpLogTable.exe需要正确的dll才能运行。因此,我们需要将这些相关的dll复制到目录或系统目录中。
https://stackoverflow.com/questions/26774563
复制相似问题