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 / Help setting up DarkGDK.( Entry Point Issues.)

Author
Message
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 15th Feb 2018 22:49
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?

Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
The Tall Man
4
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 17th Feb 2018 08:20
Did you create your new project using the DarkGDK New Project template?
Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 17th Feb 2018 18:06
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.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
TheComet
11
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Mar 2018 17:26
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.
"Jeb Bush is a big fat mistake" -- Donald Trump
https://vt.tumblr.com/tumblr_o2rvwdLLSF1rmjly4.mp4
Hotline
10
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 2nd Mar 2018 00:02
It means that you have no WinMain (win app) or main (console app) entry point in your program.Define one of them to resolve the error.
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 3rd Mar 2018 08:41

You guys have used DarkGDK before right? You don't declare Winmain(), Main(), t_main() etc.....

You declare, void DarkDGK(){ Which Normally acts as your main function.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Hotline
10
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 4th Mar 2018 14:57 Edited at: 4th Mar 2018 15:02
"You guys have used DarkGDK before right? You don't declare Winmain(), Main(), t_main() "

C++ does not care about DarkGDK.
You either define main (the standard way) or an operating system specific way (e.g WinMain ) There are no other options.

Quote: "You declare, void DarkDGK(){ Which Normally acts as your main function."

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.
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Sedit
1
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 5th Mar 2018 04:26
If I do not include void DarkGDK and attempt to use void main() it says "entry point not defined?"
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Hotline
10
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 5th Mar 2018 11:50 Edited at: 5th Mar 2018 11:51
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.
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]

Login to post a reply

Server time is: 2018-11-16 00:09:37
Your offset time is: 2018-11-16 00:09:37