문제

I'm very new to Haxe, and specifically want to use it to produce C++ code from Haxe (actually the flow would be AS3->Haxe, then Haxe->C++). My understanding is that Haxe compiles Haxe directly to a (C++) executable. But does it explicitly output the generated source?

Can/does Haxe supply the C++ code that it produces in this process? -- As I could then take and use this source within another C++ cross-compiler such as Marmalade (with modifications, of course).

I'm wondering about the intensiveness of the conversions, also. If Haxe does produce/supply the C++ source, then what does this source look like? Is e.g. memory management all packaged up into native DLLs/SOs? In that case, it seems like Haxe wouldn't be an ideal option.

(Disclaimer: I'm just trying to get some preliminary information before I go down this road. In fact, more specifically, I want to port from AS3 to C++ for Marmalade. So I want to know if it is worth writing my own converter or if Haxe provides a viable alternative.)

도움이 되었습니까?

해결책

If you're looking to go from AS3->C++ through Haxe, then you should check out NME. It allows you to use the Flash Player API to write applications to compile to native ones (through the C++ backend), swfs and html5 applications.

Also it offers a whole workflow for assets and such. And it has pretty good integration with FlashDevelop (windows only) and MonoDevelop, but you can of course use any IDE.

다른 팁

Yes, Haxe outputs the source for you. Haven't ever looked into it very deeply, but it's there. When you compile for a C++ target (e.g. Windows) the source can be found under bin\cpp\windows\obj.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top