none
unresolved external symbol __imp___CrtDbgReportW

    Question

  • Im trying to build an open source package with VC++ 2005 Express.  It uses Boost header files but no compiled Boost libraries. Using the VC soution file provided by the deveopers,  I get an unresolved symbol error in several modules for "__imp___CrtDbgReportW".

    I've seen some old posts (not here) suggesting this is a Microsoft symbol, but MSDN has nothing on it.  Does anyone know how to resolve this?

     

    Monday, January 30, 2006 6:44 AM

Answers

  • http://msdn2.microsoft.com/8hyw4sy7.aspx

    According to that MSDN article about CrtDbgReportW, the symbol is exported by debug versions of crt libraries.  A list of the crt libraries can be found here: http://msdn2.microsoft.com/abx4dbyh.aspx

    My guess would be that you need to locate the appropriate CRT library and include it in your linker settings under Project->(Project Name) Properties....


    Monday, January 30, 2006 8:37 AM

All replies

  • http://msdn2.microsoft.com/8hyw4sy7.aspx

    According to that MSDN article about CrtDbgReportW, the symbol is exported by debug versions of crt libraries.  A list of the crt libraries can be found here: http://msdn2.microsoft.com/abx4dbyh.aspx

    My guess would be that you need to locate the appropriate CRT library and include it in your linker settings under Project->(Project Name) Properties....


    Monday, January 30, 2006 8:37 AM
  • Thanks, JMerliN. I didn't look at msdn2 as I was not aware it existed -- but obviously its now the place to be.  As you suggested, my problem was resolved by selecting the correct debug runtime library, with a vcc commandline switch.

    I then had another CRT problem due to the linker loading from MSVCRT.lib (despite its own warning that it was incompatible with other libs) but since msvcrt80.dll was (corredtly) not put in the manifest the app would not start.  Ignoring MSVCRT.lib fixed that, all OK now.

     

    Monday, January 30, 2006 7:28 PM
  • Hello, i´m using GTKMM 2.4 property pages to build, in release mode all it´s ok, but in debug mode it´s not!!
    i read the link in http://msdn2.microsoft.com/abx4dbyh.aspx that posted jMerliN and then i went to the property manager, selected debug Win32, and in the properties of the  GTKMM 2.4 DEBUG i do the following:
    in the c/c++ section, in Command Line i add " /MTd", and that works ok !! i have only a warning but this compiles ok and run. i´m going to see if it affects the program.

    Regards, Gustavo
    Gustavo
    Wednesday, July 02, 2008 11:47 PM
  • I had a similar error with "__imp___CrtDbgReportW".
    It was triggered when I used a std::vector in my code.

    Turns out I was compiling a Release build with _DEBUG defined.
    This was in the C/C++ Preprocessor Definitions line in the Project Properties dialog.

    Removing _DEBUG (plus a bunch of other xxxDEBUGxxx defs) solved the linking problem.
    Sunday, November 23, 2008 1:57 AM
  • Thank you CDShaw. I had the same problem. An overlooked _DEBUG in Preprocessor Definitions. 
    Thursday, August 13, 2009 1:38 PM
  • Thanks CDShaw, it also helped me out. I was also using std::vector<T>.

    Cheers,

    - Eric
    Tuesday, February 16, 2010 1:23 PM
  • Thanks CDShaw ;)
    Saturday, May 29, 2010 3:58 PM
  • Thanks CDShaw!!!! i had the same problem been looking for hours the solution!!! this is great!! removed _DEBUG and worked like a charm!! :)

    Saturday, April 02, 2011 9:06 PM
  • removed _DEBUG ,it's great!
    Wednesday, August 03, 2011 8:31 AM
  • For me the "__imp___CrtDbgReportW" compiler error was because I was using the /MD flag and _DEBUG def.  Even though I was building a debug build because of /MDd (the debug version of the windows threading libraries) was not being used.  Because of the _DEBUG define the code was expecting functions that are only available in the debug version of the libraries.  For me I had two options used the /MDd flag or remove the _DEBUG define.  Both solutions worked however because of other reasons the only one I could use was removing the _DEBUG.  Thanks CDShaw this helped me find my issue. 
    Wednesday, November 23, 2011 5:20 PM
  • Check your "Configuration Manager", and set the value as "Release". Then go to "C/C++"->Code generation, set the value Runtime Library as MT or MD. The two value must be consistent, if you choose debug version, your Runtime Library should be MTd or MDD


    Friday, May 25, 2012 2:00 AM
  • I had to do something very similar to fix this issue.   In our case we had to differentiate between the debug and release versions.  So, when doing a release build, ignore msvcrtd.lib, and in debug build ignore msvcrt.lib
    Wednesday, June 06, 2012 3:54 PM
  • Thanks a lot!!! You saved me. I would'v gone all the way to enable "__imp___CrtDbgReportW".

    Saturday, November 03, 2012 7:02 PM