Вопрос

I want to simply create a reusable "library" for all my future projects that I'm going to be doing in Haxe. I understand there aren't library projects in Haxe, but rather you would just have a collection of source files somewhere and import them as needed. Right?

I've created a new project using Flambe (a Haxe framework) and opened it in the FlashDevelop IDE. It compiles and runs fine.

Now I want to include my library, so I go into the Project Properties under the "Classpaths" tab and set the relative path to my library. It shows up correctly in the "References", and even has the proper code completion when I type "import ...", yet when I compile it fails on the import line stating: 'Class not found : mlg.Engine'

(mlg being the package, and Engine being the class/type)


Is there anything I'm missing?

Это было полезно?

Решение

I think (i may be wrong) that flashdevelop "references" are just autocompletion and not actually passed to the compiler.

I'm not sure what's the "right" way to do it, but I can tell you what I've done (I made a few helper classes for flambe too :P): I simply created a "fake" haxelib, I created HaxeToolkit/haxe/lib/[name]/git, and in [name] i created a .current file that contains "git".

Then on flashdevelop you have to add it as a library (Project settings -> Compiler options -> Libraries).

Note: there are probably other/better ways to do it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top