What could cause these Errors
Its been a while since I used DarkDGK and I am trying to start a project again but if I use void DarkGDK() as my main it gives this error. It use to be automatic so what am I doing wrong?

Na, The template that comes with the install got lost in transition a while back since then I have always just setup my projects manually. I also found ways to use it with VS 2012 but since then have seem to lost whatever the hell it was I was doing to get it to work A: in VS 2012 and B: with the STL. For a while I was unable to use vector commands or much of the STL and I managed to fix that but am not sure how anymore.

The error means that main() does not exist anywhere. I don't use GDK so I don't know whether you have to define it yourself or whether GDK does it for you, either way, this information might help you further.

No.You IMPLEMENT the already declared voidDarkGDK() which is called from the main entry point (WinMain)

c99 standard :

Quote: "5.1.2.2.1 Program startup: (1) The function called at program startup is named main."

If you open DarkGDK2.cpp file , you can clearly see that there is the definition of int APIENTRY WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) which is the main entry point of a DarkGDK app. Inside the body of this function you see the WinMain calls the void DarkGDK() which at this point has only a definition (See few lines above the prototype definition of this function) BUT NO IMPLEMENTATION ! The GDK user is responsible to implement this function in his main cpp. (Eg :

Actually this is an ugly C-is way of forcing the user to define a body for a predefined function.(Otherwise at linking time you will get a linker error. Saying error DarkGDK has no definition.Or something similar)

So all in all : Your error message states that the application you're building has no main() (standard) or a WInMain (windows) entry point.

Quote: "If I do not include void DarkGDK and attempt to use void main() it says "entry point not defined?""

No.It should say "Linker error : void DarkGDK() has no definition". Make sure all the required static libraries are added to your library list.
As i said in the other thread GDK has a strange illogical compiler setup that is hard to overcome.I had a similar problem while tried to port my particle engine to GDK.

Attachments

I honestly would be extremely happy if I can enter into my own main() function and setup the message loops the way I desire so I have more access to the window like getting the HDC and HWND of my DirectX window so that I can add GUI elements and manipulate it easier using Windows command but I am not that familiar with DarkGDK like that to know if thats even possible.

without the while loop an Entry point error shows up. I tend to setup all my libraries and what not and click run to test if all my directories and libraries are good before I add stuff to the main functions so this I believe has been my issue.

That Solves my Entry point issue but now I am back to the real issue I had with DarkGDK which is setting up all my compiler options to make it work, something the Documentation never exactly made clear. Anyknow how to do to it to stop getting various CRT redundancy errors because more than likely the issue right now is in the order that libraries are being linked.

int APIENTRY WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) ; is the main entry point of yur aplication and is compiled into a lib.
Inside this function the app calls DarkGDK() and LoopGDK()
If you don't implement both these functions and try to build your game , at linking time the linker will detect these implementations are missing and can't link WinMain since these two functions are called inside this function.And if you can't link your main entry point you will get the mentioned linker error.

GDK has a ridiculous design which is absolutely against the fundamental c++ logic of doing things.
The crt errors are absolutely annoying and haven't found a workaround for it. Did you tried from an empty Win32 project and adding GDK source files manually to the empty project ?

EDIT :
Come to think of it.... It doesn't make sense that LoopGDK() causes this linker chain reaction. But who knows.