9

I am having trouble building OpenEXR for windows 7 using CMake.

I am following directions described here

The cmd output after I run the cmake command is as follows:

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>

This generates the solution with many projects, however, attempting to build project ALL_BUILDS fails.

I noticed all non-compiling projects (except for porject ilmimf) complain about

error LNK1181: cannot open input file '..\IlmImf\Release\IlmImf-2_2.lib'

Trying to build project IlmImf independently reports:

error MSB6006: "cmd.exe" exited with code -1073741515.

here is the full output for project 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 ==========

Note, I am running cmd and Visual Studio 2010 in administrator mode, tried compiling all configurations (debug, release, MinSizeRel, RelWithDebInfo) but nothing worked so far.

4

4 に答える 4

11

win32用にコンパイルしましたが、まったく同じ問題がありました。ilmbaseをビルドした後に作成されるlibディレクトリにdllが必要です。したがって、私の解決策は、そのフォルダーをWindowsのシステムパスに追加することでした。すべてが完全に正常に機能します。

于 2014-11-19T13:43:09.510 に答える
3
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 によって生成された 3 つの dll ファイル) を b44ExpLogTable.exe フォルダーにコピーしました。その後、openexr のビルドに成功しました。

于 2016-07-25T01:41:29.263 に答える
1

IlmImf がビルドされると、「b44ExpLogTable.exe」プログラムが生成され、ヘッダー ファイルが生成されます。このプログラム b44ExpLogTable.exe を実行するには、正しい dll が必要です。したがって、これらの関連する dll をディレクトリまたはシステム ディレクトリにコピーする必要があります。

于 2016-06-10T08:28:04.910 に答える
0

RoozyGPLFX さんの言うとおりにして、「cmd.exe」の終了エラーを克服しました。しかし、なぜ VS2010 プロジェクトのライブラリ パスに imbase lib パスを追加するだけではうまくいかないのか、まだ興味があります。これは何らかのバグだと思います。 readme ファイル。補足として、x64 でコンパイルする場合、このエラーを解決した後、IlmImf.dll をコンパイルすると、zlib によってエクスポートされるべき圧縮、圧縮 2、圧縮解除などの外部シンボルが見つかりません。エラーは、ダウンロードした zlib のバージョンが Win32 であることが原因である可能性があり、x64 で zlib ソースを再コンパイルするだけでこれを解決できます )

于 2014-11-20T07:50:33.527 に答える