0

I've a C++/CLI project and I would need to compute the median on arrays (as fast as possible). I've found here a solution, but when I try it in my C++/CLI project I get the following error:

error LNK2019: unresolved external symbol _CrtDbgReportW referenced in function "public: short & __cdecl std::vector<short,class std::allocator<short> >::operator[](unsigned __int64)"

Is this due to the fact that I'm compiling in /MD? If yes and since it seems that /clr and /MT cannot be combined, what I should use? Any suggestion?

Community
  • 1
  • 1
Mauro Ganswer
  • 1,279
  • 15
  • 32
  • 4
    This link error is usually caused by linking the Release version and linking in code that was built in the Debug configuration. Be sure to keep both projects in the same solution. – Hans Passant Mar 07 '14 at 12:35

1 Answers1

1

The credit goes to Hans Passant, however I reply in case somebody else would experience the same. In my C++/ClI project under Properties>C/C++>Code Generation>Runtime Library, while being in DEBUG mode I had /MD instead than /MDd.

Mauro Ganswer
  • 1,279
  • 15
  • 32