Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / fstream.h problems

Author
Message
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 3rd Jun 2009 23:24
Hi! I want to use the header file fstream.h for a game i'm making to load info a level from a text file. But i keep getting this error:
Quote: "1>------ Build started: Project: Dark GDK - 3D Game1, Configuration: Debug Win32 ------
1>Linking...
1>libcpmtd.lib(xdebug.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>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)
1>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)
1>Debug\Dark GDK - 3D Game1.exe : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Dark GDK - 3D Game1\Dark GDK - 3D Game1\Debug\BuildLog.htm"
1>Dark GDK - 3D Game1 - 3 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========="

I know it's something to do with using char* but i don't know how to fix it. I tried using dbOpenFile and dbReadByte functions but using fstream is much simpler and easier to use for me (i already had what i tried to accomplish working but then i added a char* which messed it up). Thanks for any help!

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 4th Jun 2009 00:12
It doesn't have anything to do with using char *. It has to do with the fact that you're using functions in the std namespace. Go into the project properties and under C/C++ select Code Generation and set Runtime Library to /MT instead of /MTd.

Or you can compile in release mode but it won't let you debug.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 4th Jun 2009 00:31
Sweet thanks! Now my level loading system works =)

Login to post a reply

Server time is: 2024-10-01 03:21:49
Your offset time is: 2024-10-01 03:21:49