0

The following example code compiles and runs with neko, but returns an error message when attempting to compile to windows:

import haxe.ui.toolkit.core.Toolkit;
import haxe.ui.toolkit.core.Root;
import haxe.ui.toolkit.core.interfaces.IDisplayObject;
import Sys.println;

class Main {
   public static function main() {

      Toolkit.openFullscreen(function(root:Root) {

      });
      println('test program has run...');
   }
}

The error message I receive means nothing to me (there is more, but it seems to repeat):

./src/haxe/ui/toolkit/core/renderers/ItemRenderer.cpp(161) : error C2259: 'haxe::ui::toolkit::core::interfaces::IStyleableDisplayObject_delegate_' : cannot instantiate abstract class with [ IMPL=haxe::ui::toolkit::core::renderers::ItemRenderer_obj ] due to following members: 'Void haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::addEventListener(String,Dynamic,hx::Null,hx::Null,hx::Null)' : is abstract with [ T=bool ] include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(127) : see declaration of 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::addEventListener' 'Dynamic haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::addEventListener_dyn(void)' : is abstract include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(128) : see declaration of 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::addEventListener_dyn' 'bool haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::dispatchEvent(openfl::_legacy::events::Event)' : is abstract include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(129) : see declaration of 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::dispatchEvent' 'Dynamic haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::dispatchEvent_dyn(void)' : is abstract include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(130) : see declaration of 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::dispatchEvent_dyn' 'bool haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::hasEventListener(String)' : is abstract include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(131) : see declaration of 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::hasEventListener' 'Dynamic haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::hasEventListener_dyn(void)' : is abstract include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(132) : see declaration of 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::hasEventListener_dyn'

Any help greatly appreciated.

Gama11
  • 31,714
  • 9
  • 78
  • 100
X__
  • 89
  • 2
  • 8
  • What version of haxe are you using? – MSGhero Nov 09 '15 at 22:21
  • haxelib version returns 3.2.0-rc.3. I have no problem compiling projects that don't use haxeui to windows exe files, so I assume I have all the necessary cpp packages etc. – X__ Nov 11 '15 at 14:01
  • what does just "haxe" return as the version? You should see something like: `Haxe Compiler 3.2.0 - (C)2005-2015 Haxe Foundation Usage : haxe.exe -main [-swf|-js|-neko|-php|-cpp|-as3] [options]` – Ian Harrigan Nov 13 '15 at 17:45
  • Apologies, thought haxelib was the same thing - that returns "Haxe Compiler 3.2.1 -(C)2005-2015 Haxe Foundation Usage : haxe.exe -main [-swf | -js | -neko | -php | -cpp | -as3] [options] – X__ Nov 16 '15 at 13:32

1 Answers1

2

It is a problem with Haxe 3.2.1.

If you downgrade to 3.2.0 then it should work.

aWaKeNiNG
  • 73
  • 2
  • 6
  • Is there a haxe/hxcpp issue opened to track this 3.2.1 bug? I would like to look into fixing it. – Andy Li Dec 21 '15 at 10:13
  • It is reported in [haxeui](https://github.com/ianharrigan/haxeui/issues/282). It seems that the problem is related to [issue #4454](https://github.com/HaxeFoundation/haxe/issues/4454) in haxe. I haven't checked with nightly builds if it works now. – aWaKeNiNG Dec 22 '15 at 11:24