I’m trying to build a root project on windows with visual C++ 2005 Express edition. So I started by building the small example muster provided by FX Gentit on the root download page.
But now I’m trying to add a simple std::vector in the TMuster.h class. It compiles, but then it fails when it tries to link
TMusterdict.obj : error LNK2019: unresolved external symbol __imp___CrtDbgReportW …
Did anyone of you already succeed to insert a STL template in a class using VC++ 2005 and root ? If yes, could you send me an example ?
ps: I already tried to add at the linkDef.h something like
#pragma link C++ class std::vector+; but it did not change anything.
asking Google would have led you here: forums.microsoft.com/MSDN/ShowPo … 7&SiteID=1
Which means you’ve downloaded the debug version of ROOT, but you compile with /MD (requesting to link against the release runtime DLL), or you’ve downloaded the release version of ROOT, but compile your files with /MDd (requesting to link against the debug runtime DLL). See the help on /MD and /MDd, and how to switch the setting in your project. Rebuild all after changing that setting.
Thanks a lot Axel,
you gave the right direction to look for !
I didn’t have a debug version of ROOT but the standard one. The problem was due to the fact that when I built my project the general configuration of my project was “debug” and not “release”… Also I had forgotten to put “debug format = C7” in C/C++ / General.
But now I understand a bit more the difference between MD and MDd