application compiler error only in GLFW
Monkey Targets Forums/Desktop/application compiler error only in GLFW
| ||
I get an error when compiling in GLFW only it works fine everywhere else. I think it's a problem with monkey but I don't know enough to be sure of it. Maybe someone can explain it to me otherwise:Import Mojo Function Main:Int() Local list:List<wall>' = New List list.AddLast(New roundwall) list.AddLast(New arcwall) For Local w:wall = Eachin list w.update() w.render() Next End Function Class wall Field x:Float Field y:Float Method update:Int() Abstract Method render:Int() Abstract End Class Class roundwall Extends wall Method update:Int() End Method Method render:Int() End Method End Class Class arcwall Extends wall Method update:Int() End Method Method render:Int() End Method End Class this is the error I am getting: /Users/ccs4/Desktop/monkeypool/testlist.build/glfw/xcode/../main.cpp:2576: error: cannot allocate an object of abstract type 'bb_testlist_roundwall' /Users/ccs4/Desktop/monkeypool/testlist.build/glfw/xcode/../main.cpp:2372: note: because the following virtual functions are pure within 'bb_testlist_roundwall': /Users/ccs4/Desktop/monkeypool/testlist.build/glfw/xcode/../main.cpp:2360: note: virtual int bb_testlist_wall::bbm_update() I am using v44 of monkey since v45 does not work with abstract yet. |
| ||
Roundwall isn't implementing update. I'd say there's still a Monkey bug, because it should be flagging the issue at compile time (and also the fact that you're declaring abstract methods on a class that isn't declared as abstract). |
| ||
Ops! it's a stripped down version of my code which should have been update and render not display. I think I screwed it up some where. Thanks. Why I used display and update? I think I need a break. and no it doesn't require to have the wall class to be declared as abstract it never did not even in blitzMax. |
| ||
Its happening with me and I deleted the GLFW folder in the build folder and and then rebuild, all worked fine. |
| ||
thanks Vinians. The problem was that I had display instead of render in one of the classes and the only one that was catching the error as it should was the GLFW. Everywhere else it compiles fine. I raised a bug in the bug section. Lets see what Mark has to say. the new Version of monkey has a different bug that has to do with the requiring a return for a prototype function that should NOT. |