Haxe cannot find std libraries

I am trying to configure Haxe using IntelliJ and my Linux box. I downloaded 64-bit Linux binaries from the haxe (haxe 3.1.3) site and the intellij community publication. I installed the Haxe plugin in intellij and then created a new Haxe module. For sdk, I selected the haxe folder, which I downloaded from the haxe website. I created a new configuration to compile and run, but it gives me an error that it cannot find the standard library. Why is this happening?

Haxe Directory Tree

haxe-3.1.3 ├── extra └── std ├── cpp ├── cs ├── flash ├── flash8 ├── haxe ├── java ├── js ├── neko ├── php ├── sys └── tools 

haxe-3.1.3 was the directory that I chose for haxe toolbox in intellij. Creating a new Haxe project allows me to choose Haxe 3.1.3 (this means that the toolbox has been configured correctly since it was recognized). External libraries in the intellij project include a Haxe dir with std (when expanding a folder to see what it contains).

In the Project Structure dialog box in the SDK, I can see that the libraries are configured correctly (haxe-3.1.3 / std) and the haxe executable as well (haxe-3.1.3 / haxelib). The class path contains the library directory

When I compile it using openFl and with flash as the target, I get the following error

 Error:compilation failed /home/avlahop/development/Haxe/haxe-3.1.3/haxelib Error:libneko.so: cannot open shared object file: No such file or directory 

When I switch to the Haxe and Neko or Javascript compiler, I get the following

 Information:Compilation completed with 1 error and 1 warning in 0 sec Information:1 error Information:1 warning Error:compilation failed Warning:Standard library not found 

My class

 package ; class Test3 { public function new() { } public static function main(): Void{ trace("Hello from haxe and IntelliJ IDEA"); } } 

I really want to enter it, but I can not start ...

+5
source share
1 answer

Manually go to / usr / lib and find libneko.so. Sometimes installations may throw one at the end or something like libneko.so.1.

Rename the file correctly. You may have to use a newer version of neko, I had to compile it from git to make it work: https://github.com/HaxeFoundation/neko

If you haven't noticed anything, make sure the environment variables are correct. Open / etc / environment in the text editor of your choice

 export HAXE_STD_PATH=/usr/local/haxe/std:. # path to std + :. export HAXE_HOME=/usr/whatever/haxe # path to haxe export NEKOPATH=/usr/local/neko # path to neko 

Please note that if you used HAXE_LIBRARY_PATH, this was changed to HAXE_STD_PATH in later versions of Haxe. You also need a link to this file, open your / etc / profile with sudo and check:

 . /etc/environment 

That is all I have. Hope this works for you.

+2
source

Source: https://habr.com/ru/post/1206513/


All Articles