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 / 2 Questions

Author
Message
Kotold
15
Years of Service
User Offline
Joined: 15th May 2009
Location:
Posted: 16th May 2009 04:59
I'm trying to create a 2d rpg but am having a couple of issues. Just for back ground info: I know my way around C++ but am new to Dark GDK.
Question 1) If I try to include ostream or fstream, I get the following link errors:
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 - Game1.exe : fatal error LNK1120: 2 unresolved externals
Anyone know what gives?

2) I want to be able to read from files in order to create script files. Since fstream gives the above errors, I've been trying Dark GDK's functions. However, the only useful function I can find is char* dbReadString(int *f); This only gives me the first string of my script file (txt file). Is there a way to get next line? I also tried make the whole script file one long string. This works until the string gets too long (and this is far from ideal). Any ideas?

I appreciate any help,
Kotold
ABXG
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Canada
Posted: 16th May 2009 09:29
You need to either compile in release mode or set the runtime library for debug mode to /MT. That should clear everything up and let you us fstream.

------------------------------------
Currently 1500+ lines of code into an "over-the-shoulder" action RPG with combat based on rag-doll physics.

Login to post a reply

Server time is: 2024-10-01 01:29:55
Your offset time is: 2024-10-01 01:29:55