We Got _DEBUG Errors

This is a discussion on We Got _DEBUG Errors within the Windows Programming forums, part of the Platform Specific Boards category; I am to use the functionality of some useful debugging routines in a library I found and tried defining _DEBUG ...

  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465

    We Got _DEBUG Errors

    I am to use the functionality of some useful debugging routines in a library I found and tried defining _DEBUG on my application. Apparently this has some wide-reaching effects for some other things and causes the use of debug allocation routines and whatever. If that wasn't giving me errors, this would not be a problem to me. But, they are giving me linker errors.

    Code:
    Warning	1	warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library	Pong
    Error	2	error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: __thiscall std::_Vector_const_iterator<class C3D,class std::allocator<class C3D> >::_Vector_const_iterator<class C3D,class std::allocator<class C3D> >(class C3D *,class std::_Container_base const *)" (??0?$_Vector_const_iterator@VC3D@@V?$allocator@VC3D@@@std@@@std@@QAE@PAVC3D@@PBV_Container_base@1@@Z)	CThing.obj
    Error	3	error LNK2001: unresolved external symbol __CrtDbgReportW	libcpmtd.lib
    Error	4	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
    Error	5	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)	libcpmtd.lib
    Error	6	fatal error LNK1120: 3 unresolved externals	C:\Documents and Settings\Tonto\My Documents\Visual Studio 2005\Projects\Pong\Debug\Pong.exe

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  2. #2
    Registered User
    Join Date
    Apr 2006
    Posts
    4
    You should define
    Code:
    #define _CRTDBG_MAP_ALLOC
    also check if there is the
    Code:
    #include <crtdbg.h>
    line.

  3. #3
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Where should crtdbg.h be included? I defined that ppdef also. I get errors like:

    Code:
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2733: second C linkage of overloaded function '_dupenv_s_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : see declaration of '_dupenv_s_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : see declaration of '_calloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2733: second C linkage of overloaded function '_free_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : see declaration of '_free_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2733: second C linkage of overloaded function '_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : see declaration of '_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2733: second C linkage of overloaded function '_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : see declaration of '_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2733: second C linkage of overloaded function '_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : see declaration of '_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2733: second C linkage of overloaded function '_aligned_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : see declaration of '_aligned_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2733: second C linkage of overloaded function '_aligned_offset_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : see declaration of '_aligned_offset_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2733: second C linkage of overloaded function '_aligned_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : see declaration of '_aligned_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2733: second C linkage of overloaded function '_aligned_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : see declaration of '_aligned_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2733: second C linkage of overloaded function '_aligned_offset_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : see declaration of '_aligned_offset_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2733: second C linkage of overloaded function '_aligned_offset_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : see declaration of '_aligned_offset_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2039: 'calloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2873: 'calloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2039: 'free' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2873: 'free' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2039: 'malloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2873: 'malloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2039: 'realloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2873: 'realloc' : symbol cannot be used in a using-declaration
    1>CUtilities.cpp
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2733: second C linkage of overloaded function '_dupenv_s_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : see declaration of '_dupenv_s_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : see declaration of '_calloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2733: second C linkage of overloaded function '_free_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : see declaration of '_free_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2733: second C linkage of overloaded function '_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : see declaration of '_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2733: second C linkage of overloaded function '_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : see declaration of '_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2733: second C linkage of overloaded function '_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : see declaration of '_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2733: second C linkage of overloaded function '_aligned_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : see declaration of '_aligned_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2733: second C linkage of overloaded function '_aligned_offset_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : see declaration of '_aligned_offset_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2733: second C linkage of overloaded function '_aligned_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : see declaration of '_aligned_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2733: second C linkage of overloaded function '_aligned_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : see declaration of '_aligned_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2733: second C linkage of overloaded function '_aligned_offset_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : see declaration of '_aligned_offset_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2733: second C linkage of overloaded function '_aligned_offset_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : see declaration of '_aligned_offset_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2039: 'calloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2873: 'calloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2039: 'free' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2873: 'free' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2039: 'malloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2873: 'malloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2039: 'realloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2873: 'realloc' : symbol cannot be used in a using-declaration
    1>CThing.cpp
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2733: second C linkage of overloaded function '_dupenv_s_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : see declaration of '_dupenv_s_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : see declaration of '_calloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2733: second C linkage of overloaded function '_free_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : see declaration of '_free_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2733: second C linkage of overloaded function '_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : see declaration of '_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2733: second C linkage of overloaded function '_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : see declaration of '_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2733: second C linkage of overloaded function '_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : see declaration of '_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2733: second C linkage of overloaded function '_aligned_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : see declaration of '_aligned_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2733: second C linkage of overloaded function '_aligned_offset_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : see declaration of '_aligned_offset_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2733: second C linkage of overloaded function '_aligned_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : see declaration of '_aligned_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2733: second C linkage of overloaded function '_aligned_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : see declaration of '_aligned_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2733: second C linkage of overloaded function '_aligned_offset_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : see declaration of '_aligned_offset_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2733: second C linkage of overloaded function '_aligned_offset_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : see declaration of '_aligned_offset_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2039: 'calloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2873: 'calloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2039: 'free' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2873: 'free' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2039: 'malloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2873: 'malloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2039: 'realloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2873: 'realloc' : symbol cannot be used in a using-declaration
    1>CSquare.cpp
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2733: second C linkage of overloaded function '_dupenv_s_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : see declaration of '_dupenv_s_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : see declaration of '_calloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2733: second C linkage of overloaded function '_free_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : see declaration of '_free_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2733: second C linkage of overloaded function '_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : see declaration of '_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2733: second C linkage of overloaded function '_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : see declaration of '_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2733: second C linkage of overloaded function '_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : see declaration of '_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2733: second C linkage of overloaded function '_aligned_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : see declaration of '_aligned_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2733: second C linkage of overloaded function '_aligned_offset_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : see declaration of '_aligned_offset_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2733: second C linkage of overloaded function '_aligned_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : see declaration of '_aligned_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2733: second C linkage of overloaded function '_aligned_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : see declaration of '_aligned_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2733: second C linkage of overloaded function '_aligned_offset_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : see declaration of '_aligned_offset_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2733: second C linkage of overloaded function '_aligned_offset_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : see declaration of '_aligned_offset_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2039: 'calloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2873: 'calloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2039: 'free' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2873: 'free' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2039: 'malloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2873: 'malloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2039: 'realloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2873: 'realloc' : symbol cannot be used in a using-declaration
    1>CPong.cpp
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2733: second C linkage of overloaded function '_dupenv_s_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : see declaration of '_dupenv_s_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : see declaration of '_calloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2733: second C linkage of overloaded function '_free_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : see declaration of '_free_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2733: second C linkage of overloaded function '_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : see declaration of '_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2733: second C linkage of overloaded function '_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : see declaration of '_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2733: second C linkage of overloaded function '_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : see declaration of '_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2733: second C linkage of overloaded function '_aligned_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : see declaration of '_aligned_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2733: second C linkage of overloaded function '_aligned_offset_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : see declaration of '_aligned_offset_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2733: second C linkage of overloaded function '_aligned_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : see declaration of '_aligned_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2733: second C linkage of overloaded function '_aligned_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : see declaration of '_aligned_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2733: second C linkage of overloaded function '_aligned_offset_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : see declaration of '_aligned_offset_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2733: second C linkage of overloaded function '_aligned_offset_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : see declaration of '_aligned_offset_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2039: 'calloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2873: 'calloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2039: 'free' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2873: 'free' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2039: 'malloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2873: 'malloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2039: 'realloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2873: 'realloc' : symbol cannot be used in a using-declaration
    1>CMain.cpp
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2733: second C linkage of overloaded function '_dupenv_s_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : see declaration of '_dupenv_s_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : see declaration of '_calloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2733: second C linkage of overloaded function '_free_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : see declaration of '_free_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2733: second C linkage of overloaded function '_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : see declaration of '_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2733: second C linkage of overloaded function '_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : see declaration of '_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2733: second C linkage of overloaded function '_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : see declaration of '_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2733: second C linkage of overloaded function '_aligned_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : see declaration of '_aligned_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2733: second C linkage of overloaded function '_aligned_offset_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : see declaration of '_aligned_offset_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : error C2733: second C linkage of overloaded function '_aligned_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(600) : see declaration of '_aligned_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : error C2733: second C linkage of overloaded function '_aligned_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(601) : see declaration of '_aligned_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : error C2733: second C linkage of overloaded function '_aligned_offset_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(602) : see declaration of '_aligned_offset_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : error C2733: second C linkage of overloaded function '_aligned_offset_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(603) : see declaration of '_aligned_offset_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2039: 'calloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(22) : error C2873: 'calloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2039: 'free' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(23) : error C2873: 'free' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2039: 'malloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(24) : error C2873: 'malloc' : symbol cannot be used in a using-declaration
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2039: 'realloc' : is not a member of '`global namespace''
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdlib(26) : error C2873: 'realloc' : symbol cannot be used in a using-declaration
    1>CGLContainer.cpp
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : error C2733: second C linkage of overloaded function '_dupenv_s_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(488) : see declaration of '_dupenv_s_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(592) : see declaration of '_calloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : error C2733: second C linkage of overloaded function '_free_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(593) : see declaration of '_free_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : error C2733: second C linkage of overloaded function '_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(594) : see declaration of '_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : error C2733: second C linkage of overloaded function '_realloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(595) : see declaration of '_realloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2059: syntax error : 'constant'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : error C2733: second C linkage of overloaded function '_recalloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(596) : see declaration of '_recalloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : error C2733: second C linkage of overloaded function '_aligned_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(598) : see declaration of '_aligned_malloc_dbg'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2059: syntax error : 'string'
    1>C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : error C2733: second C linkage of overloaded function '_aligned_offset_malloc_dbg' not allowed
    1>        C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h(599) : see declaration of '_aligned_offset_malloc_dbg'
    
    ...
    Oh yeah, this occurs whether that header is included or not.
    Last edited by Tonto; 11-14-2006 at 11:18 PM.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  4. #4
    Registered User
    Join Date
    Apr 2006
    Posts
    4
    Code:
    #define _CRTDBG_MAP_ALLOC
    should be before all the header files.
    Code:
    #include CRTDBG.H
    should be after all the header files.

    e.g
    Code:
    #define _CRTDBG_MAP_ALLOC
    
    #include <iostream>
    .....// other header files 
    #include <cstdlib>
    
    
    #include <crtdbg.h>

  5. #5
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    This is my header file, cmain, which is included in several source files.

    Code:
    #pragma once
    
    #define _UNICODE
    #define UNICODE
    
    #define _USE_MATH_DEFINES
    #define _WIN32_WINNT 0x500
    #define _CRTDBG_MAP_ALLOC
    
    #define STRICT
    #define WIN32_LEAN_AND_MEAN
    
    #define _DEBUG
    
    #include <windows.h>
    
    #include <gl/gl.h>
    #include <gl/glu.h>
    #include <gl/glaux.h>
    
    #include <cstdio>
    #include <cmath>
    
    #include <vector>
    #include <string>
    
    #include <exception>
    #include <algorithm>
    
    #include "CTracer.h"
    #include "CUtilities.h"
    
    #include <crtdbg.h>
    All sorts of errors still

    Code:
    Error	1	error C2059: syntax error : 'constant'	C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h	488
    Error	2	error C2733: second C linkage of overloaded function '_dupenv_s_dbg' not allowed	C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h	488
    Error	3	error C2059: syntax error : 'constant'	C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h	592
    Error	4	error C2733: second C linkage of overloaded function '_calloc_dbg' not allowed	C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h	592
    Error	5	error C2059: syntax error : 'constant'	C:\Program Files\Microsoft Visual Studio 8\VC\include\stdlib.h	593
    
    ...

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  6. #6
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Okay. I remembered to switch to /MTd and got it to compile, but as we all know, rarely does that indicate that the problem is solved. So, it's all running and stuff, inside a procedure that's creating the window, and it crashes. Rarrr. It would appear as though all my debug output strings are being mapped to 'logic errors'? For example:

    Code:
        dout << TEXT("CWindowClassEx(LPCTSTR, WNDPROC, UINT, HICOR, HCURSOR, int, int, LPCTSTR)\n");
    0040F099  push        offset std::logic_error::`vftable'+0C4h (487318h) 
    0040F09E  mov         ecx,offset dout (4A333Ch) 
    0040F0A3  call        dstream::operator<< (401B0Eh)
    Seems to think that offset std::logic_error::`vftable'+0C4h is a string, and ends up causing a lot of exceptions. Am I interpreting this right? This happens when _DEBUG is defined, _UNICODE or no _UNICODE, and I am linking with multi-threaded debug libraries. This does not happen when _DEBUG and plain /MT is being used. Any insight? Totally bizarre to me.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. global namespace errors
    By stubaan in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 04:11 PM
  2. Ten Errors
    By AverageSoftware in forum Contests Board
    Replies: 0
    Last Post: 07-20-2007, 11:50 AM
  3. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  4. Help me with these errors... :-(
    By major_small in forum C++ Programming
    Replies: 6
    Last Post: 09-07-2003, 09:18 PM
  5. errors in class(urgent)
    By ayesha in forum C++ Programming
    Replies: 2
    Last Post: 11-10-2001, 06:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21