none
Weird Error Message, Need Help

    Question

  • Hi, I'm building a plug-in for Acrobat using C++.NET and I get these error messages when I try to build this plug-in :

    LNK2001: unresolved external symbol __malloc_dbg

    LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)

    LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)

    LNK1120: 2 unresolved externals

    Does anyone know what they mean and how to solve the problem ? Cause I dont :-)

    thanks a lot for your help !

     

    Alex

    Tuesday, October 10, 2006 5:57 PM

Answers

  • Whouhouuuu ! After about 8h of research I finally got it. I had to take off the "_debug" from the Preprocessor Definitions. And everything works just fine.
    Wednesday, October 11, 2006 12:42 PM

All replies

  • Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\OLDNAMES.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\libcpmtd.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\odbc32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\odbccp32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\kernel32.lib:

    Found __imp__CreateFileA@28

    Referenced in LIBCMT.lib(open.obj)

    Loaded kernel32.lib(KERNEL32.dll)

    Found __imp__SetEndOfFile@4

    Referenced in LIBCMT.lib(chsize.obj)

    Loaded kernel32.lib(KERNEL32.dll)

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\user32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\gdi32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\winspool.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\comdlg32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\advapi32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\shell32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\ole32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\oleaut32.lib:

    Searching C:\Program File

    s\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\uuid.lib:

    Finished searching libraries

    Finished pass 1

    Creating library .\Debug/PITemplate.lib and object .\Debug/PITemplate.exp

    Finished generating .exp file

    Searching libraries

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\odbc32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\odbccp32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\kernel32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\user32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\gdi32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\winspool.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\comdlg32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\advapi32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\shell32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\ole32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\oleaut32.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\lib\uuid.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\LIBCMT.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\OLDNAMES.lib:

    Searching C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\libcpmtd.lib:

    Finished searching libraries

    Finished pass 1

    Generating non-SAFESEH image.

    Invoking CVTRES.EXE:

    /machine:x86

    /verbose

    /out:"C:\DOCUME~1\devj4\LOCALS~1\Temp\lnk18C6.tmp"

    /readonly

    ".\Debug\plugin.res"

    Microsoft (R) Windows Resource To Object Converter Version 7.10.3052.4

    Copyright (C) Microsoft Corporation. All rights reserved.

    adding resource. type:BITMAP, name:103, language:0x0409, flags:0x1030, size:344

    adding resource. type:CURSOR, name:1, language:0x0809, flags:0x1030, size:308

    adding resource. type:GROUP_CURSOR, name:101, language:0x0809, flags:0x1030, size:20

    libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)

    libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol __malloc_dbg

    libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)

    Debug/LinkToBlue.api : fatal error LNK1120: 2 unresolved externals

    Build log was saved at "file://d:\My Documents\Visual Studio Projects\LinkToBlue\Debug\BuildLog.htm"

    LinkToBlue - 4 error(s), 0 warning(s)

     

    ---------------------- Done ----------------------

    Build: 0 succeeded, 1 failed, 0 skipped

     

    This is a part of what I get in the OutPut window. I guess the problem is related to libcpmtd.lib. I am building in /MT and it has to stay like that, does anyone have an Idea ? I have read a lot of questions and solution but nothing worked.

    thanks

    Tuesday, October 10, 2006 9:05 PM
  • Whouhouuuu ! After about 8h of research I finally got it. I had to take off the "_debug" from the Preprocessor Definitions. And everything works just fine.
    Wednesday, October 11, 2006 12:42 PM
  • Thanks! I was getting multiple errors while trying to connect mysql with VC++ .This solution worked for me too....
    Tuesday, April 01, 2008 8:00 PM