Can't compile to GLFW anymore, HTML5 works fine
Monkey Targets Forums/Desktop/Can't compile to GLFW anymore, HTML5 works fine
| ||
When compiling my game with the GLFW target i recieve the following errors: *EDIT* actually it has to be my code, because it won't compile in 2.9 and 3.0 compiling the game to html5 works without any problems. has anyone a hint what the problem might be? |
| ||
Found the problem: after switching to strict mode i supposed that the methods OnCreate OnUpdate and OnRender are returning the type void, so i defined them as OnCreate:Void. After examination of the cpp file i found out that the App Class defines those functions as OnCreate:Int. My Game extending App with the wrong return types in those functions caused the problem. But compiling to HTML5 this goes unnoticed (might be because of loose typing?). So the correct code would be like this Method OnCreate:Int () ActiveGameState = New GameStateMenu SetUpdateRate 60 Return 0 End I don't know if it is possible to check if the typing of extended classes is correct before compiling? BTW: is there anyway to change the post title to solved or something, now knowing the problem the post title seems somewhat 'not really' related to its contents |
| ||
Hey Stefan, check this post out: http://www.monkeycoder.co.nz/Community/posts.php?topic=135 |