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 / Porting 2005 projects to 2008

Author
Message
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 11th Dec 2007 22:01
Sup.

i'm trying to port one of my massive game projects to the new dgdk and visual studio express 2008. its been a horriable evening of failure since I started!

just copying the project folder and opening it would seem to work at first, compiles and even links. But running it causes a crash with no information in a source file I dont have. Amazingly it happens before the first line of DarkGDK() executes as I have a random test line in there (just a variable being assigned a nosense value) just to have a break point on which never fires. So i guess that problem is in the DGDK itself somewhere, or in some other place I cant get access to.

So I decided fine, i'll create a new project using the Dark Game wizard. Create new project, test run.. everything runs fine and gives me the black window you would expect. I add in all my engines source files etc.. now i get linker errors. ungh. so after much much fiddling im down to linker errors like:

error LNK2001: unresolved external symbol __CrtDbgReportW

which is an old old error im sure we used to have to fix in early versions of the sdk! but i cant for the life of me find out how to get rid of those linker errors.

So anyway, I use newton and fmod with this engine and was wondering if maybe some of those conflict. So i create another new project and basically i start adding header files one at time. amazingly the first header I added threw a linker error, and what was that header?

#include <string>

...!!

that little bueaty throws a: 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)

so whats going on if i cant even link with the string class? though as I write this im beginging to have an idea... I'm going to have to reinstall the platform sdk arnt I? downloading all 400+ megs of it >> is that it?

wasnt mentioned in the install instructions lads!

Any help appreiciated.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Dec 2007 22:36
Switch from multithreaded debug code generation to multithreaded - you need to set it to this whether you are compiling in debug or release mode.

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 12th Dec 2007 19:16
that fixed a few things ian, but I still have:



to deal with :/ Cant figure em out. The first one, dont worry, obviously vc2k8 doesnt like something that vc2k5 ignored, I can fix that, but what lib im missing for these unresolved I have no idea. (windows sdk as its now called is installed)

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Dec 2007 19:26
Just guessing:

Only one (and Correct) DirectX Installed? The DirectX SDK Match?

I think you need to Exclude the LIBCMT from the compile. I think there is a way under DEBUG "Compile" configuration area(s) for excluding header files - I think LibCmt is one of the no no's.

Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 12th Dec 2007 19:29
mm, libcmtd is excluded - trying to exclude libcmt produces over 1,400 linker errors

I do however have two sdks installed for dx >> i'll try and get rid of one.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Dec 2007 19:42
Ok - libcmtd is the one - my mistake - I knew it was something like that. Sorry I wasn't more help.

Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 12th Dec 2007 19:58
uninstalled both directx's and installed the august one again to make sure it was the only one setup and.. no change.

frustrating

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Dec 2007 20:10
If it makes you feel better - I spent a WHOLE day getting DarkGDK to Compile and run "Hello World".

tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 28th Dec 2007 14:40
Quote: "mm, libcmtd is excluded - trying to exclude libcmt produces over 1,400 linker errors"


You can link with only ONE of these libraries. In debug build it is the "D" version, in release it is the one without D. So, use the "/NODEFAULTLIB" linker option and then add the particular library you need.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Dec 2007 14:47
@Sephnroth - have you had any luck?

When I ported to 2008, I cheated..

I make a new empty project with the 3d wizard template. Then I just copy my *.cpp and *.h files to the correct folder for the project, and then add em. Note I don't include anything but my own stuff - and string.h - but's that's it.

Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 28th Dec 2007 15:16
I got my "new" project working with the aid of Apex, but running it caused the same unexplained crash which triggered before DarkGDK() even executed.

I tracked it down in the end to one single line in one header file which was:

vector<int> vIndexData;

it was inside a class prototype and was a private member. But that one line, for some reason, blows everything up. i've ignored it for now and been working on other parts of the engine - that vector was part of the mini map code which I will rewrite later on.

Still, baffles me.

FERSIS
18
Years of Service
User Offline
Joined: 17th May 2006
Location:
Posted: 28th Dec 2007 16:03
Quote: "If it makes you feel better - I spent a WHOLE day getting DarkGDK to Compile and run "Hello World"."

Me too
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Dec 2007 17:44
(Though vs2008 and the new DarkGDK (Free) was much easier compared to that)

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Dec 2007 19:42
Yeah - I UNINSTALLEd EVERYTHING DirectX/GDK Related. Then followed the install sequence etc. Hmm. XP Pro? Vista?

Login to post a reply

Server time is: 2024-11-19 20:56:25
Your offset time is: 2024-11-19 20:56:25