I'm writing a program that uses a library which requires the runtime library to be set to "Multi-Threaded DLL" (Command line: /MD), so it is. Well, recently, I've only used C in my application, but I wish to start using C++ variable types and methods. I tried to do a simple vector operation and while it compiled fine, it generated a linker error when I tried to build.
I pass the following into a function: vector<int>& Parameters
The line: int parameter2 = Parameters.at(1); generates a linker error:
error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: int const & __thiscall std::_Vector_const_iterator<int,class std::allocator<int> >::operator*(void)const " ( D $_Vector_const_iterator@HV $allocator@H@std@@@std@@QBEABHXZ)
(This is using "Debug" as the active config.)
How can this be resolved Remember, I can't change the runtime library type without losing a major component. It seems strange that it only errors with the command line option /MD.

Linker error with vector use & Multi-Threaded DLL config
dogbear
You can fix this by removing the _DEBUG define from the preprocessor definitions. If you don't want to lose that valuable tool, tell us what goes wrong when you link with /MDd.
D.D.R.
I'm guessing that using the Multi-Threaded DLL debug option uses the debug runtime library "msvcrtd.dll", which replaces the normal runtime library, so everything should be fine. Thanks again!