curly_brackets
curly_brackets

Reputation: 5598

"Unresolved Symbol" when opening a Haxe project in IntelliJ

I want to try out the Haxe programming language to create a game. When I use the Flash Develop application on Windows, all references are found as there is a Project-file included.

But when I open the same on my Mac, or Windows, the references are not found, giving me the error "Unresolved symbol".

Do you know how I can map/import/define these resources/references/symbols?? :-)

The below is a screenshot of the issue...

Thanks in advance... :-)

enter image description here

Upvotes: 1

Views: 968

Answers (3)

AS3Boyan
AS3Boyan

Reputation: 149

However, the HaxeFlixel template project (and many classes in HaxeFlixel) also reference other classes in the "flash" package, such as flash.display.Sprite. IntelliJ is still reporting "Unresolved symbol" on the package and "Unresolved type" on those classes.

flash.* imports should be able to resolve, if you have set up Haxe SDK(toolkit) Some HaxeFlixel classes is tricky to parse(have some generics).

Upvotes: 0

Alex Nauda
Alex Nauda

Reputation: 4536

In IDEA 13, open the Module Settings for your Haxe project, go to Modules > Dependencies, and click the plus sign to add a new dependency. Select "Library..." then click the New Library button and select Haxe from the drop-down. Navigate to the library's location on your disk (for example, I found flixel in /usr/lib/haxe/lib/flixel).

Following the above procedure resolved this issue for me for flixel, flixel addons, and openfl. However, the HaxeFlixel template project (and many classes in HaxeFlixel) also reference other classes in the "flash" package, such as flash.display.Sprite. IntelliJ is still reporting "Unresolved symbol" on the package and "Unresolved type" on those classes. Since the project runs fine from the command line, I believe this is an issue with the Haxe Plugin, but I haven't been able to figure out how to get around it.

Upvotes: 4

stroncium
stroncium

Reputation: 1430

  1. As far as I know, IntelliJ plugin is a bit out of date.
  2. These are not from haxe std library. You need to install and add corresponding libraries. (haxe compiler takes them as -lib <name>, and I guess there should be some list to add them to in your project settings in IntelliJ.

Upvotes: 0

Related Questions