Page 1 of 1

Nearly compiled 2.47 with Microsoft VC++ 2008

Posted: Sun Aug 24, 2008 10:51 pm
by spamagnet
Hey all, I know this is a n00b question, but it's been a while since I worked much in C/C++. I got the 2.47 branch source code and got all the dependencies compiled successfully. When I do the final link, though, I get this error:

Code: Select all

------ Build started: Project: blender, Configuration: Blender Release Win32 ------
Linking...
libguardedalloc.lib(mallocn.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
   Creating library ..\..\bin\blender.lib and object ..\..\bin\blender.exp
Iex.lib(IexThrowErrnoExc.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
IlmImf.lib(ImfHuf.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
IlmThread.lib(IlmThreadSemaphoreWin32.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
IlmThread.lib(IlmThreadPool.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
IlmThread.lib(IlmThreadWin32.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
... snipped a bunch more ...
IlmImf.lib(ImfChannelList.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@QAEXXZ)
..\..\bin\blender.exe : fatal error LNK1120: 3 unresolved externals
Build log was saved at "file://k:\SoftwareDev\Blender\build\msvc_7\source\blender\BuildLog.htm"
blender - 71 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 33 up-to-date, 0 skipped ==========
It appears to be a standard template library issue of some sort. Any pointers about how to go about troubleshooting it?

Thanks!

Posted: Mon Aug 25, 2008 1:31 am
by jesterKing
You need to make sure that you're linking against the openexr libs that are in the lib_vs2008 folder in lib/windows/openexr.

/Nathan

ps. you can also build using scons + msvc

Posted: Mon Aug 25, 2008 6:41 am
by stiv
std::_String_base::_Xran(void)const
That looks like the Standard C++ library is missing. In Unixy Land, that would be libstdc++, though Bog knows what it is called in the Windows world.

Posted: Tue Aug 26, 2008 4:37 am
by Stukfruit
It's got something to do with the MT/MD options for choosing what runtime (indeed, the standard library) to use. Make sure you're using the same option for all libraries and Blender itself.

Can't say much more useful about it, but I can tell you that OpenEXR (that's what the Ilm libraries are from) is a bitch to build and link correctly.

Posted: Tue Aug 26, 2008 6:44 am
by jesterKing
It's pretty simple. The projectfiles in SVN are for msvs 2005, and you're building with 2008.

As I told you, you have to make sure you link to the right libraries (the ones in lib_vs2008 -> https://svn.blender.org/svnroot/bf-blen ... ib_vs2008/ ). You'll have to change the libpaths for the proper projects to point to this directory.

/Nathan

Posted: Tue Aug 26, 2008 1:19 pm
by spamagnet
jesterKing wrote:As I told you, you have to make sure you link to the right libraries (the ones in lib_vs2008 -> https://svn.blender.org/svnroot/bf-blen ... ib_vs2008/ ).
Thanks, Nathan! Looks like that did it!

Posted: Tue Aug 26, 2008 1:54 pm
by jesterKing
w00t :)

/Nathan