1- Open the Visual Studio solution in vc\vc8\OpenEXR and the convert it to VS10 if necessary
2- Copy zlib.h, zconf.h from the zlib source directory and halfExport.h from ilmbase\half to Deploy\include
3- Copy zlibwapi.lib to Deploy\lib\Win32\Debug and Deploy\lib\Win32\Release. Also copy zlibwapi.exp and zlibwapi.dll to Deploy\bin\Win32\Debug and Deploy\bin\Win32\Release
4- Now hit F7 and you should receive a long list of link errors. Strangely enough, some files were not added to the IlmImf project so we're going to add them manually
Right click at project IlmImf and add all *.hpp and *.cpp files. We could've added only the missing ones, but then we have to analyze every linking error to find out which functions definition were missing.
5- Now in the properties window of project IlmImf, select all configurtions and all platforms, go to C++/Preprocessor and add these macros ZLIB_DLL, ZLIB_WINAPI
6- Compile the solution again and you should receive a build success.
Congratulations! You have successfully built OpenEXR :)
P.S. Building the OpenEXR tools is not mandatory, but if you find any problem building them, let me know.
2- Copy zlib.h, zconf.h from the zlib source directory and halfExport.h from ilmbase\half to Deploy\include
3- Copy zlibwapi.lib to Deploy\lib\Win32\Debug and Deploy\lib\Win32\Release. Also copy zlibwapi.exp and zlibwapi.dll to Deploy\bin\Win32\Debug and Deploy\bin\Win32\Release
4- Now hit F7 and you should receive a long list of link errors. Strangely enough, some files were not added to the IlmImf project so we're going to add them manually
Right click at project IlmImf and add all *.hpp and *.cpp files. We could've added only the missing ones, but then we have to analyze every linking error to find out which functions definition were missing.
5- Now in the properties window of project IlmImf, select all configurtions and all platforms, go to C++/Preprocessor and add these macros ZLIB_DLL, ZLIB_WINAPI
6- Compile the solution again and you should receive a build success.
Congratulations! You have successfully built OpenEXR :)
P.S. Building the OpenEXR tools is not mandatory, but if you find any problem building them, let me know.
I build openexr 2.1.0 with visual studio 2013 following your steps, but I get 75 errors.
RépondreSupprimerAll of them like this:
錯誤 3087 error C2491: 'Imf::TypedAttribute::staticTypeName' : dllimport 函式 的定義是不被允許的 c:\programming\openexr\openexr-2.1.0\ilmimf\imfdoubleattribute.cpp 54 1 IlmImfTest
Please help me.
I build openexr 2.1.0 with visual studio 2010 on the other computer following your steps and get LNK2019 errors, such as:
RépondreSupprimer錯誤 1 error LNK2019: 無法解析的外部符號 "bool __cdecl Imf::isDeepData(class std::basic_string,class std::allocator > const &)" (?isDeepData@Imf@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 在函式 "public: void __thiscall Imf::Header::setType(class std::basic_string,class std::allocator > const &)" (?setType@Header@Imf@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 中被參考 C:\Programming_2.1.0_x32\OpenEXR\openexr-2.1.0\vc\vc8\OpenEXR\IlmImf\ImfHeader.obj IlmImf
I have check that the additional dependency, additional library, additional include and the copy file many times, but still can't solve it.