Skip to main content
gamedev.net
🔒 Locked

debug error with filebuf

Started by nick5454 May 10, 2003 at 1:42 AM 3 replies 2k views
Original Post
nick5454
nick5454
i added this line std::filebuf fbPattern; and I get this error i get these link errors 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(locale.obj) : error LNK2001: unresolved external symbol __malloc_dbg libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function __Tolower libcpmtd.lib(xwcsxfrm.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function __Wcsxfrm 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) libcpmtd.lib(xwcsxfrm.obj) : error LNK2001: unresolved external symbol __free_dbg libcpmtd.lib(locale.obj) : error LNK2019: unresolved external symbol __realloc_dbg referenced in function "private: void __thiscall std::locale::_Locimp::_Addfac(class std::locale::facet *,unsigned int)" (?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z) libcpmtd.lib(xmbtowc.obj) : error LNK2019: unresolved external symbol __CrtDbgReport referenced in function __Mbrtowc_lk Debug/example1.exe : fatal error LNK1120: 4 unresolved externals does this mean filebuf cant be used or do I have to create it in an ATL package outside of my app
Sneftel
Sneftel
clean and recompile.

If you still get the error, make sure you''re not using a static library with a different version of the CRT (debug/release, multi/single-threaded).


How appropriate. You fight like a cow.
nick5454
nick5454
but what I dont get is I havent changed the configuration. I pasted some copde in using filebuf and it started

I comment out the filbuf lines and it works just fine.

is filebuf using incompatible debug functions?
nick5454
nick5454
Well for anyone curious to this solution

Change the
C++ -> CodeGeneration -> Runtime Libraries from /Md to /Mtd

it worked wow, I think theres additional debugging implanted inside the stream libraries

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.