1- First go to www.openexr.com/downloads.html and download the latest release of OpenEXR and ILMBase
2- Download the latest source code of zlib and the precompiled release too from here www.winimage.com/zLibDll/index.html
3- Create a directory "C:\Programming\OpenEXR" and extract all the downloaded archive files there
4- Inside the directory of ILMBase, go to vc\vc8\IlmBase and open the Visual Studio solution. Follow the standard steps to convert the solution to VS10
5- Hit F7 so you can get a list of the errors. We'll solve them one by one.
Error 1 error C3861: '__builtin_trap': identifier not found
Open the properties of the Iex project, select "All Configurations" and "All Platforms", then go to C++/Preprocessor. In Preprocessor Definitions, add the macros PLATFORM_WINDOWS and OPENEXR_DLL. The latter is needed to build the DLL library.
Compile the solution again. If you see an error like this "error LNK1104: cannot open file '..\Win32\Debug\Iex.map'", hit F7 again and it should disappear.
7- Now in the error list, you should see something like this
"Error 1 error C1083: Cannot open include file: 'IlmBaseConfig.h': No such file or directory c:\programming\openexr\ilmbase-2.1.0\imath\imathnamespace.h 78"
Always pay careful attention in which project the error is located. In our case, it is in project Imath. So go the properties of Imath, select all configurations and platforms, go to C++/General, then in "Additional Include Directories" add the following line "..\..\..\..\config.windows". Do the same thing for projects Iex and IexTest.
If you still encounter the same error, try compiling each project one by one separately starting from Iex, Half, IlmThread then Imath. Do a rebuild for each project if the error persists. If the debug build succeeded, switch to the release configuration and build the solution again.
Now you should have a directory named Deploy in C:\Programming, that contains everything you need to start developing with ILMBase.
And that's it! Now we can use the compiled ILMBase to build OpenEXR.
2- Download the latest source code of zlib and the precompiled release too from here www.winimage.com/zLibDll/index.html
3- Create a directory "C:\Programming\OpenEXR" and extract all the downloaded archive files there
4- Inside the directory of ILMBase, go to vc\vc8\IlmBase and open the Visual Studio solution. Follow the standard steps to convert the solution to VS10
5- Hit F7 so you can get a list of the errors. We'll solve them one by one.
Error 1 error C3861: '__builtin_trap': identifier not found
Open the properties of the Iex project, select "All Configurations" and "All Platforms", then go to C++/Preprocessor. In Preprocessor Definitions, add the macros PLATFORM_WINDOWS and OPENEXR_DLL. The latter is needed to build the DLL library.
Compile the solution again. If you see an error like this "error LNK1104: cannot open file '..\Win32\Debug\Iex.map'", hit F7 again and it should disappear.
7- Now in the error list, you should see something like this
"Error 1 error C1083: Cannot open include file: 'IlmBaseConfig.h': No such file or directory c:\programming\openexr\ilmbase-2.1.0\imath\imathnamespace.h 78"
Always pay careful attention in which project the error is located. In our case, it is in project Imath. So go the properties of Imath, select all configurations and platforms, go to C++/General, then in "Additional Include Directories" add the following line "..\..\..\..\config.windows". Do the same thing for projects Iex and IexTest.
If you still encounter the same error, try compiling each project one by one separately starting from Iex, Half, IlmThread then Imath. Do a rebuild for each project if the error persists. If the debug build succeeded, switch to the release configuration and build the solution again.
Now you should have a directory named Deploy in C:\Programming, that contains everything you need to start developing with ILMBase.
And that's it! Now we can use the compiled ILMBase to build OpenEXR.
Hi, thank you so much for this guide. I am currently having lnk2019 error while building Iex. Wondering if you have face such issue before.
RépondreSupprimerThanks
Hello,
RépondreSupprimerThanks for your comment. It's been a while since I compiled OpenEXR so I don't remember all the issues that I faced back then, but if you post the full error message I might be able to help.
If you're building with VS2013, at the end you'll get an error that "max is not a member of std". Just open the file that caused the error and add "#include " at the top with other includes.
RépondreSupprimerHi, I am using VS 2013 and having the same error lnk2019
RépondreSupprimerError 39 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl Iex::ErrnoExc::ErrnoExc(class std::basic_string,class std::allocator > const &)" (__imp_??0ErrnoExc@Iex@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "void __cdecl Iex::throwErrnoExc(class std::basic_string,class std::allocator > const &,int)" (?throwErrnoExc@Iex@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) C:\Users\admin\Downloads\ilmbase-2.1.0\vc\vc8\IlmBase\Iex\IexThrowErrnoExc.obj Iex