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
6
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
10
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
6
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
16
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
15
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
6
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
15
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
6
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
15
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]
Sedit
6
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 15th Dec 2018 19:30 Edited at: 15th Dec 2018 19:31
Hotline, no it states Entry point not defined.


I am back trying to again use DarkGDK.lib and I can not remember what needs to be done to set this up,

I am trying to use the Compiled for 2017 version this time btw.

Following the same setup I did here
https://github.com/xSeditx/DarkGDKAutomatons/blob/master/GDKLife/GDKLife/MAIN.cpp

I did something different in that project which needs to be done to setup a darkgdk project which I can not remember but DarkGDK defines my Entry point for me as void DarkGDK(){}


Am I possible forgetting an include file or something which defines the Winmain() or did the SDK define the entry point for me in the past?
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);

Attachments

Login to view attachments
Sedit
6
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 15th Dec 2018 19:33
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.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Sedit
6
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 15th Dec 2018 19:41 Edited at: 15th Dec 2018 20:16
I solved it, So it seems the entry point does not get defined UNLESS the main gameloop is inside of the



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.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 21st Dec 2018 22:56 Edited at: 21st Dec 2018 23:01
Yes.What you experiencing is exactly what i explained above.

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.
[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
6
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 31st May 2019 00:23
Ty Hotline, I ran into a host of other problems that time when I was attempting to do that. I really like GDK and it is honestly fun to program with but its showing its age a lot because of the design choices made when creating it. I hope to one day sit down and fix up the entire project to bring it up to date, fix the massive memory leaks scattered through out the project and overall bring it up to speed with modern C++ and perhaps maybe add some OpenGL functionality while at it because that honestly would just be the best thing I could imaging. How awesome it would be to be able to use DarkGDK on my ARM Linux system would be insane. There is just no way I could do that on my own at this point and I believe a small team would have to tackle the problem of bringing DarkDGK into the modern C++ 17 and 20 ages.


Could you imagine the potential of a DarkGDK with Multithreading capabilities, Thread pools, OpenGL, Coroutines, fibers etc..etc... I would never use another library ever again.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
YouTube: https://www.youtube.com/channel/UC0WGoCiVQxMdPxZZkqFks1g?view_as=subscriber
Discord: https://discord.gg/sQazuty
The Tall Man
10
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 4th Jun 2019 23:02
I would love to have something like this for my Linux os too! I really don't think it'd be that difficult to create a simple and efficient high-level programming interface (like DarkGDK was) from scratch though. It's on my list of projects to get to actually. At this point, that would probably be a lot easier anyway than retrofitting an old system that really mixes DirectX into its basic structure.
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
6
Years of Service
User Offline
Joined: 3rd Sep 2017
Location: Ghetto of NJ
Posted: 6th Jun 2019 19:39
I believe that the new App Game Kit has a free ARM system and I might be mistaken but that seems like a Darkbasic lite last time I checked so perhaps that would be worth looking into.
Sphere sphere = new Sphere(0.5f);
InsanelyRedundantJava insanelyredundantjava = new InsanelyRedundantJava(Redundancy1, Redundancy2);
YouTube: https://www.youtube.com/channel/UC0WGoCiVQxMdPxZZkqFks1g?view_as=subscriber
Discord: https://discord.gg/sQazuty
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 2nd Jul 2019 11:37
GDK is based 100% on windows libraries so it is impossible to fix it or add support for another platform. GDK and DBpro is windows only and always will be. However i had an idea recently to create a multi platform DBP 2.0 which actually would be pretty easy to do.
Unfortunatelly no one (or at least very very few people) use basic anymore so it just doesn't worth to fiddle with it.
[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: 2024-04-16 19:04:13
Your offset time is: 2024-04-16 19:04:13