0

以下示例代码使用 neko 编译和运行,但在尝试编译到 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...');
   }
}

我收到的错误消息对我来说毫无意义(还有更多,但似乎重复了):

./src/haxe/ui/toolkit/core/renderers/ItemRenderer.cpp(161) : 错误 C2259: 'haxe::ui::toolkit::core::interfaces::IStyleableDisplayObject_delegate_' : 无法用 [ IMPL 实例化抽象类=haxe::ui::toolkit::core::renderers::ItemRenderer_obj ] 由于以下成员:'无效 haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::addEventListener(String,Dynamic,hx ::Null,hx::Null,hx::Null)' : 是抽象的 [ T=bool ] include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(127) : 参见'haxe:: 的声明ui::toolkit::core::interfaces::IDisplayObject_obj::addEventListener''动态 haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::addEventListener_dyn(void)':是抽象的 include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(128) :参见 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::addEventListener_dyn' 'bool haxe:: 的声明ui::toolkit::core::interfaces::IDisplayObject_obj::dispatchEvent(openfl::_legacy::events::Event)' : 是抽象的 include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(129) : 见 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::dispatchEvent' '动态 haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::dispatchEvent_dyn(void)' 的声明: 是抽象的 include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(130) : 参见 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::dispatchEvent_dyn' 'bool haxe 的声明: :ui::toolkit::core::interfaces::IDisplayObject_obj::hasEventListener(String)' : 是抽象的 include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(131) : 参见 'haxe::ui::toolkit::core::interfaces 的声明::IDisplayObject_obj::hasEventListener' '动态 haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::hasEventListener_dyn(void)' : 是抽象的 include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h (132) : 见 'haxe::ui::toolkit::core::interfaces::IDisplayObject_obj::hasEventListener_dyn' 的声明interfaces::IDisplayObject_obj::hasEventListener_dyn(void)' : 是抽象的 include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(132) : 参见 'haxe::ui::toolkit::core::interfaces 的声明::IDisplayObject_obj::hasEventListener_dyn'interfaces::IDisplayObject_obj::hasEventListener_dyn(void)' : 是抽象的 include\haxe/ui/toolkit/core/interfaces/IDisplayObject.h(132) : 参见 'haxe::ui::toolkit::core::interfaces 的声明::IDisplayObject_obj::hasEventListener_dyn'

非常感谢任何帮助。

4

1 回答 1

2

这是 Haxe 3.2.1 的问题。

如果您降级到 3.2.0,那么它应该可以工作。

于 2015-12-10T22:55:35.913 回答