OpenEXR 1.4.0 Windows Libraries Error

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
etr9j
Posts: 0
Joined: Fri Mar 10, 2006 2:40 am

OpenEXR 1.4.0 Windows Libraries Error

Post by etr9j » Tue Oct 10, 2006 3:14 am

Hey everyone,

I noticed that the current OpenEXR libraries (lib/windows/openexr) in the CVS are the version 1.2.0 libs. I was attempting to update them on my end to see if I could build it with just replacing the old libs with the ones from the OpenEXR site with the pre-compiled 1.4.0 version libs (http://www.openexr.com/downloads.html). Of course, it's not that easy and I am getting errors on MS Visual C++ 2005. I keep getting this: "msvcprt.lib(MSVCP80.dll) : error LNK2005: ... already defined in bl_imbuf.lib(openexr_api.obj)" and a bunch of similar errors in the blender project the moment I drop the pre-compiled libs in. So obviously I am missing a big piece of this puzzle, which isn't surprising since I am new at all this. Any ideas what that missing piece is?

SirDude
Posts: 233
Joined: Sun Oct 13, 2002 7:37 pm
Location: University of Minnesota (USA)
Contact:

Post by SirDude » Tue Oct 10, 2006 2:52 pm

I'm not a msvc expert, but this error message:
msvcprt.lib(MSVCP80.dll) : error LNK2005: ... already defined in bl_imbuf.lib(openexr_api.obj)"

Makes it look like the issue is you have compiled with different versions
of msvcprt.lib and they are getting in the way of each other. I would
first try doing a clean build. If that doesn't solve it, you need to hunt
down the thing your compiling when you get the error and the one it reports
(openexr_api.obj) and recompile one of them with the other compiler.

My guess from the looks of it a clean build will fix it all.

etr9j
Posts: 0
Joined: Fri Mar 10, 2006 2:40 am

Post by etr9j » Tue Oct 10, 2006 3:01 pm

Hey SirDude, thanks for responding. I think you might have something there. Maybe I should build my own OpenEXR libs from source with my msvcprt.lib in place rather than relying on the pre-compiled one libraries.

etr9j
Posts: 0
Joined: Fri Mar 10, 2006 2:40 am

Post by etr9j » Tue Oct 17, 2006 3:17 pm

I finally got around to compiling OpenEXR and there were no problems doing that, but building Blender with them still results in an error. I'll post the entire error below in the hopes maybe it might spark a solution from someone. I have a feeling it might have something to do with openexr_api.cpp since that's were the IlmImb include file locations are defined and the only thing I am changing when building are the OpenExr include and lib files. I am not an expert programmer so I could just as easily be grasping at straws to try to make sense of what the issue is. Blender builds fine with the OpenEXR libraries and include files in the current cvs lib module. It's a groovy mystery gang!

Hope this isn't too much to post:

Code: Select all

1>Compiling...
1>creator.c
1>buildinfo.c
1>Generating Code...
1>Compiling resources...
1>Linking...
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::assign(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?assign@?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::append(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?append@?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z) already defined in libelbeem.lib(attributes.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::str(void)const " (?str@?$basic_ostringstream@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) already defined in libelbeem.lib(utilities.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::`vbase destructor'(void)" (??_D?$basic_ostringstream@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ) already defined in libelbeem.lib(utilities.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::_Mutex::_Lock(void)" (?_Lock@_Mutex@std@@QAEXXZ) already defined in libcpmt.lib(xmutex.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::_Mutex::_Unlock(void)" (?_Unlock@_Mutex@std@@QAEXXZ) already defined in libcpmt.lib(xmutex.obj)
1>msvcprt.lib (MSVCP80.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??0?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@ DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@ DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception@std@@YA_NXZ) already defined in libcpmt.lib(uncaught.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D @std@@@std@@QAEXH_N@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (?sputn@?$basic_streambuf@ DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@ DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??4?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@ DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z) already defined in libelbeem.lib(utilities.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "bool __cdecl std::operator<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?MDU?$char_traits@ D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z) already defined in libelbeem.lib(ntl_geometryobject.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?6DU?$char_traits@ D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z) already defined in libelbeem.lib(utilities.obj)
1>msvcprt.lib(MSVCP80.dll ) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(char const *)" (??4?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) already defined in libcpmt.lib(locale0.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::clear(int,bool)" (?clear@?$basic_ios@ DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in bl_imbuf.lib(openexr_api.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: __thiscall std::basic_ofstream<char,struct std::char_traits<char> >::basic_ofstream<char,struct std::char_traits<char> >(char const *,int,int)" (??0?$basic_ofstream@ DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z) already defined in libboolop.lib(BOP_Mesh.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::basic_ofstream<char,struct std::char_traits<char> >::`vbase destructor'(void)" (??_D?$basic_ofstream@ DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in libboolop.lib(BOP_Mesh.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: __thiscall std::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >::basic_ostringstream<char,struct std::char_traits<char>,class std::allocator<char> >(int)" (??0?$basic_ostringstream@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z) already defined in libelbeem.lib(utilities.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(float)" (??6?$basic_ostream@ DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z) already defined in libelbeem.lib(elbeem.obj)
1>msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::find(char const *,unsigned int,unsigned int)const " (?find@?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z) already defined in libelbeem.lib(ntl_blenderdumper.obj)
1>   Creating library ..\..\bin\blender.lib and object ..\..\bin\blender.exp
1>libjpeg.lib(jerror.o ) : warning LNK4217: locally defined symbol __iob imported in function _output_message
1>libpng_st.lib(pngerror.o) : warning LNK4049: locally defined symbol __iob imported
1>libpng_st.lib(pngwutil.o) : warning LNK4049: locally defined symbol __iob imported 
1>libpng_st.lib(pngrutil.o) : warning LNK4049: locally defined symbol __iob imported
1>IlmThread.lib(IlmThreadPool.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@XZ (public: __thiscall std::exception::exception(void)) imported 
1>IlmImf.lib(ImfScanLineInputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@XZ (public: __thiscall std::exception::exception(void)) imported
1>IlmImf.lib(ImfTiledInputFile.obj) : warning LNK4217: locally defined symbol ??0exception@std@@ QAE@XZ (public: __thiscall std::exception::exception(void)) imported in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
1>IlmImf.lib(ImfMisc.obj) : warning LNK4049: locally defined symbol ??0exception@std@@ QAE@XZ (public: __thiscall std::exception::exception(void)) imported
1>IlmImf.lib(ImfTileOffsets.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@XZ (public: __thiscall std::exception::exception(void)) imported 
1>IlmImf.lib(ImfInputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@XZ (public: __thiscall std::exception::exception(void)) imported
1>IlmImf.lib(ImfOutputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@ QAE@XZ (public: __thiscall std::exception::exception(void)) imported
1>IlmImf.lib(ImfTiledOutputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@XZ (public: __thiscall std::exception::exception(void)) imported 
1>IlmImf.lib(ImfFrameBuffer.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@XZ (public: __thiscall std::exception::exception(void)) imported
1>Iex.lib(IexBaseExc.obj) : warning LNK4217: locally defined symbol ??0exception@std@@ QAE@XZ (public: __thiscall std::exception::exception(void)) imported in function "public: __thiscall Iex::BaseExc::BaseExc(char const *)" (??0BaseExc@Iex@@QAE@PBD@Z)
1>IlmImf.lib(ImfHeader.obj) : warning LNK4049: locally defined symbol ??0exception@std@@ QAE@XZ (public: __thiscall std::exception::exception(void)) imported
1>IlmImf.lib(ImfAttribute.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@XZ (public: __thiscall std::exception::exception(void)) imported 
1>IlmImf.lib(ImfChannelList.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@XZ (public: __thiscall std::exception::exception(void)) imported
1>IlmThread.lib(IlmThreadPool.obj) : warning LNK4049: locally defined symbol ??1exception@std@@ UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported
1>IlmImf.lib(ImfScanLineInputFile.obj) : warning LNK4049: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported 
1>IlmImf.lib(ImfTiledInputFile.obj) : warning LNK4049: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported
1>IlmImf.lib(ImfMisc.obj) : warning LNK4049: locally defined symbol ??1exception@std@@ UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported
1>IlmImf.lib(ImfTileOffsets.obj) : warning LNK4049: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported 
1>IlmImf.lib(ImfInputFile.obj) : warning LNK4049: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported
1>IlmImf.lib(ImfOutputFile.obj) : warning LNK4049: locally defined symbol ??1exception@std@@ UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported
1>IlmImf.lib(ImfTiledOutputFile.obj) : warning LNK4049: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported 
1>IlmImf.lib(ImfFrameBuffer.obj) : warning LNK4049: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported
1>Iex.lib(IexBaseExc.obj) : warning LNK4217: locally defined symbol ??1exception@std@@ UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported in function "public: virtual __thiscall Iex::BaseExc::~BaseExc(void)" (??1BaseExc@Iex@@UAE@XZ)
1>IlmImf.lib(ImfHeader.obj) : warning LNK4049: locally defined symbol ??1exception@std@@ UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported
1>IlmImf.lib(ImfAttribute.obj) : warning LNK4049: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported 
1>IlmImf.lib(ImfChannelList.obj) : warning LNK4049: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported
1>IlmImf.lib(ImfHeader.obj) : warning LNK4217: locally defined symbol _strncpy imported in function "public: class Imf::Name & __thiscall Imf::Name::operator=(char const * const)" (??4Name@Imf@@ QAEAAV01@QBD@Z)
1>IlmImf.lib(ImfChannelList.obj) : warning LNK4217: locally defined symbol _strncpy imported in function "public: class Imf::Name & __thiscall Imf::Name::operator=(char const * const)" (??4Name@Imf@@ QAEAAV01@QBD@Z)
1>IlmImf.lib(ImfFrameBuffer.obj) : warning LNK4217: locally defined symbol _strncpy imported in function "public: class Imf::Name & __thiscall Imf::Name::operator=(char const * const)" (??4Name@Imf@@ QAEAAV01@QBD@Z)
1>IlmImf.lib(ImfTiledInputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported
1>IlmImf.lib (ImfMisc.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported
1>IlmImf.lib(ImfTileOffsets.obj) : warning LNK4049: locally defined symbol ??0exception@std@@ QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported
1>IlmThread.lib(IlmThreadPool.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported 
1>IlmImf.lib(ImfOutputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported
1>IlmImf.lib(ImfTiledOutputFile.obj ) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported
1>IlmImf.lib(ImfFrameBuffer.obj) : warning LNK4217: locally defined symbol ??0exception@std@@ QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
1>IlmImf.lib (ImfScanLineInputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported
1>IlmImf.lib(ImfHeader.obj) : warning LNK4217: locally defined symbol ??0exception@std@@ QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
1>IlmImf.lib (ImfAttribute.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported
1>IlmImf.lib(ImfChannelList.obj) : warning LNK4217: locally defined symbol ??0exception@std@@ QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported in function "public: __thiscall std::bad_alloc::bad_alloc(char const *)" (??0bad_alloc@std@@QAE@PBD@Z)
1>IlmImf.lib (ImfInputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABQBD@Z (public: __thiscall std::exception::exception(char const * const &)) imported
1>IlmThread.lib(IlmThreadPool.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfTileOffsets.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported
1>IlmImf.lib(ImfTiledMisc.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfPxr24Compressor.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported
1>IlmImf.lib(ImfPizCompressor.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfChannelListAttribute.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported
1>IlmImf.lib(ImfScanLineInputFile.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfTiledInputFile.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported
1>IlmImf.lib(ImfMisc.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfInputFile.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported
1>IlmImf.lib(ImfOutputFile.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfTiledOutputFile.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported
1>IlmImf.lib(ImfFrameBuffer.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfHeader.obj) : warning LNK4217: locally defined symbol __invalid_parameter_noinfo imported in function "public: bool __thiscall std::_Tree<class std::_Tmap_traits<class Imf::Name,class Imf::Attribute *,struct std::less<class Imf::Name>,class std::allocator<struct std::pair<class Imf::Name const ,class Imf::Attribute *> >,0> >::const_iterator::operator==(class std::_Tree<class std::_Tmap_traits<class Imf::Name,class Imf::Attribute *,struct std::less<class Imf::Name>,class std::allocator<struct std::pair<class Imf::Name const ,class Imf::Attribute *> >,0> >::const_iterator const &)const " (??8const_iterator@?$_Tree@ V?$_Tmap_traits@VName@Imf@@PAVAttribute@2@U?$less@VName@Imf@@@std@@V?$allocator@U?$pair@$$CBVName@Imf@@PAVAttribute@2@@std@@@5@$0A@@std@@@std@@QBE_NABV012@@Z)
1>IlmImf.lib(ImfAttribute.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfStringAttribute.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported
1>IlmImf.lib(ImfChannelList.obj) : warning LNK4049: locally defined symbol __invalid_parameter_noinfo imported 
1>IlmImf.lib(ImfTiledInputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmImf.lib (ImfMisc.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmImf.lib(ImfTileOffsets.obj) : warning LNK4049: locally defined symbol ??0exception@std@@ QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmThread.lib(IlmThreadPool.obj) : warning LNK4217: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported in function "void __cdecl IlmThread::`dynamic initializer for 'gThreadPool''(void)" (??__EgThreadPool@IlmThread@@YAXXZ) 
1>IlmImf.lib(ImfOutputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmImf.lib( ImfTiledOutputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmImf.lib(ImfFrameBuffer.obj ) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmImf.lib(ImfScanLineInputFile.obj) : warning LNK4049: locally defined symbol ??0exception@std@@ QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmImf.lib(ImfHeader.obj) : warning LNK4217: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported in function "public: __thiscall std::bad_alloc::bad_alloc(class std::bad_alloc const &)" (??0bad_alloc@std@@ QAE@ABV01@@Z)
1>IlmImf.lib(ImfAttribute.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1> IlmImf.lib(ImfChannelList.obj) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmImf.lib(ImfInputFile.obj ) : warning LNK4049: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported
1>IlmImf.lib(ImfHeader.obj) : warning LNK4217: locally defined symbol _strncmp imported in function "public: void __thiscall Imf::Header::readFrom(class Imf::IStream &,int &)" (?readFrom@ Header@Imf@@QAEXAAVIStream@2@AAH@Z)
1>IlmImf.lib(ImfChannelList.obj) : warning LNK4049: locally defined symbol _strncmp imported
1>IlmImf.lib(ImfMisc.obj) : warning LNK4049: locally defined symbol _memmove_s imported 
1>IlmImf.lib(ImfTileOffsets.obj) : warning LNK4049: locally defined symbol _memmove_s imported
1>IlmImf.lib(ImfOutputFile.obj) : warning LNK4217: locally defined symbol _memmove_s imported in function "unsigned __int64 * __cdecl std::_Copy_opt<unsigned __int64 *,unsigned __int64 *,struct std::random_access_iterator_tag>(unsigned __int64 *,unsigned __int64 *,unsigned __int64 *,struct std::random_access_iterator_tag,struct std::_Scalar_ptr_iterator_tag,struct std::_Range_checked_iterator_tag)" (??$_Copy_opt@ PA_KPA_KUrandom_access_iterator_tag@std@@@std@@YAPA_KPA_K00Urandom_access_iterator_tag@0@U_Scalar_ptr_iterator_tag@0@U_Range_checked_iterator_tag@0@@Z)
1>IlmImf.lib(ImfTiledOutputFile.obj) : warning LNK4049: locally defined symbol _memmove_s imported 
1>IlmImf.lib(ImfScanLineInputFile.obj) : warning LNK4049: locally defined symbol _memmove_s imported
1>IlmImf.lib(ImfTiledInputFile.obj) : warning LNK4049: locally defined symbol _memmove_s imported
1>IlmImf.lib (ImfStdIO.obj) : warning LNK4217: locally defined symbol __errno imported in function "void __cdecl Imf::`anonymous namespace'::clearError(void)" (?clearError@?A0xf20cc7a5@Imf@@YAXXZ)
1>Iex.lib(IexThrowErrnoExc.obj ) : warning LNK4049: locally defined symbol __errno imported
1>IlmImf.lib(ImfPxr24Compressor.obj) : warning LNK4217: locally defined symbol _ceil imported in function "public: __thiscall Imf::Pxr24Compressor::Pxr24Compressor(class Imf::Header const &,int,int)" (??0Pxr24Compressor@Imf@@ QAE@ABVHeader@1@HH@Z)
1>IlmImf.lib(ImfZipCompressor.obj) : warning LNK4049: locally defined symbol _ceil imported
1>Iex.lib(IexThrowErrnoExc.obj) : warning LNK4217: locally defined symbol _strerror imported in function "void __cdecl Iex::throwErrnoExc(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?throwErrnoExc@Iex@@ YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>IlmThread.lib(IlmThreadWin32.obj) : error LNK2019: unresolved external symbol __imp___endthreadex referenced in function "unsigned int __stdcall IlmThread::`anonymous namespace'::threadLoop(void *)" (?threadLoop@?A0x67758f2c@IlmThread@@ YGIPAX@Z)
1>IlmThread.lib(IlmThreadWin32.obj) : error LNK2019: unresolved external symbol __imp___beginthreadex referenced in function "public: void __thiscall IlmThread::Thread::start(void)" (?start@Thread@IlmThread @@QAEXXZ)
1>..\..\bin\blender.exe : fatal error LNK1120: 2 unresolved externals

Lynx3d
Posts: 0
Joined: Tue Jan 24, 2006 5:09 pm

Post by Lynx3d » Tue Oct 17, 2006 10:29 pm

Against which runtime library did you build OpenEXR? Static or dynamic (i.e. /MT or /MD)?
Make sure you use the dynamic one..."Multithreaded DLL" or something like that in Visual Studio project settings.

etr9j
Posts: 0
Joined: Fri Mar 10, 2006 2:40 am

Post by etr9j » Wed Oct 18, 2006 2:06 pm

Thanks for the reply Lynx3d. I'm using Multi-threaded DLL (/MD) for all the OpenEXR projects when I build.

Lynx3d
Posts: 0
Joined: Tue Jan 24, 2006 5:09 pm

Post by Lynx3d » Wed Oct 18, 2006 11:03 pm

Oh wait...blender blender actually still uses /MT?
Just forgot that the blender cvs has its own lib module with precompiled exr. Apparently someone build a static library with static runtime...sorry i'm afraid i told crap :)

I only know for sure that yafray uses /MD for both. Originally yafray was built with /MT too, but that gave exactly such errors with precompiled EXR, and for some reason, building EXR itself with /MT also gave me linker errors. Hence we switched everything to /MD (EXR gets statically linked nevertheless), which in addition gives much smaller binaries...
I don't know what happens if you edit the compiler flags for blender to /MD, that would be my next suggestion now...
(somewhat i'm really glag to be on linux now :P )

etr9j
Posts: 0
Joined: Fri Mar 10, 2006 2:40 am

Post by etr9j » Thu Oct 19, 2006 3:09 am

I think you might have something there. However when I converted Blender (every project) to /MD and used both the precompiled and my own compiled EXR libs (made with /MD) blender failed to build. Though there was both a larger and different error output this time. I also tried compiling the OpenEXR libs with /MT - which worked fine, but I got the same build error as before. I'm trying some other ideas right now - so the search continues!

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing » Thu Oct 19, 2006 6:59 am

I think you need to tell the linker not to link in default libs (thinkin out loud here)

/Nathan

danielo
Posts: 0
Joined: Mon Oct 23, 2006 4:48 am
Location: Montreal

Post by danielo » Mon Oct 23, 2006 5:35 am

I also ran into this bug. I tried to use /MT to compile OpenEXR + zlib, since that is what Blender seems to favor. The problem, as it appears now (after forcing the linker to ignore msvcrt.lib,msvcrtd.lib,msvcprt.lib,msvcprtd.lib, etc), is related to:

Code: Select all

half_d.lib(half.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(float)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z) referenced in function "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class half)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@Vhalf@@@Z)
half_d.lib(half.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_istream<char,struct std::char_traits<char> > & __thiscall std::basic_istream<char,struct std::char_traits<char> >::operator>>(float &)" (__imp_??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z) referenced in function "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class half &)" (??5@YAAAV?$basic_istream@DU?$char_traits@D@std@@@std@@AAV01@AAVhalf@@@Z)
Why are these symbols undefined?
ostream& ostream::operator<<(float)
istream& istream::operator<<(float&)
I'm really tempted to think this an MS oversight (I guess nobody ever really uses this option so that fact that these functions are missing from
libcmt[d].lib + libcmt[d].lib hasn't come up?).

Either way, I sure would like to see a solution. Next time, I'll probably just drop /MT[d] and (try to) use /MD[d] everywhere. Stay tuned.

I was also getting the following unresolved symbol: _invalid_parameter_noinfo
This thread shed some light: Unresolved external symbols - anyone know where these are from?
http://www.devmaster.net/forums/showthread.php?t=6404
PS. I tried both OpenEXR 1.2 and then OpenEXR 1.4. Blender code doesn't seem to have to change (except the header file layout has changed)[/url]

danielo
Posts: 0
Joined: Mon Oct 23, 2006 4:48 am
Location: Montreal

Post by danielo » Tue Oct 24, 2006 8:06 am

Oops. Found the problem:

The Half.vcproj project contained the following extraneous preprocessor definitions: _USRDLL and _DLL
These definitions were interfering with the switch from /MD[d] to /MT[d], and "pulling in" extra symbols (and the DLL version of the CRT with #pragma comment(lib,"msvcprtd")). "Ignoring" (with /nodefaultlib) this library then leaves the (aforementionned redirection) operators unresolved.

Pesky (someone should probably submit the change to OpenEXR).

Lynx3d
Posts: 0
Joined: Tue Jan 24, 2006 5:09 pm

Post by Lynx3d » Tue Oct 24, 2006 10:32 am

Argh...nasty.
That explains a lot of the troubles, probably something like this also screwed linking with /MT on te version i tried (1.2.1? not sure anymore)...

etr9j
Posts: 0
Joined: Fri Mar 10, 2006 2:40 am

Post by etr9j » Fri Nov 10, 2006 2:51 am

@danielo
That is a big find you made with the OpenEXR preprocessor definitions.

That solved the issue, now I can build fine with OpenEXR 1.4.0. THANKS!

etr9j
Posts: 0
Joined: Fri Mar 10, 2006 2:40 am

Post by etr9j » Fri Nov 10, 2006 3:43 am

Also,

I thought I would mention to one of the OpenEXR mailing lists this Half _dll/_usrdll issue, but it seems someone has seen this before... and in version 1.3.1 no less):

http://lists.gnu.org/archive/html/opene ... 00018.html

Post Reply