Standard Library not found by Vscode



  • Hi, i had some problems following the "install haxeflixel" guide, and now when i try to build haxe projects on vscode i get this error:

    Haxe version does not support JSON-RPC, using legacy --display API.
    Building Cache...
    Failed - try fixing the error(s) and restarting the language server:

    Standard library not found
    Client connected
    Client disconnected
    Client connected
    Client disconnected

    (Sorry, i don't know how to put a code block here)

    I believe the problem lies in the installation path i chosed:
    I downloaded the haxe binaries and placed them in User/Documents/haxe
    i set haxelib repository path as User/Documents/haxe/libs
    (i'm running mac osx and had errors with the default path)

    Also browsing online i found that the problem could be that the .lime/config.xml points to the wrong directory, but mine doesn't seem to have any path associated

    <?xml version="1.0" encoding="utf-8"?>
    <config>

    <section id="defines">
    	
    </section>
    <define name="MAC_USE_CURRENT_SDK" value="1" />
    

    </config>


  • administrators

    Perhaps you need to set the HAXE_STD_PATH environment variable since you have it in a non-standard location. It should point to the std folder next to the Haxe binary.



  • I tried what you suggested but i got this error:

    flixel tpl -n "HelloWorld"
    Called from ? line 1
    Called from haxelib/client/Main.hx line 1609
    Called from haxelib/client/Main.hx line 406
    Called from haxelib/client/Main.hx line 1492
    Called from haxelib/client/Main.hx line 1102
    Called from /Users/travis/build/HaxeFoundation/haxe/std/neko/_std/sys/io/File.hx line 30
    Uncaught exception - [file_contents,/Users/me/Documents/haxe/haxelib//.current]

    I added those paths by the way:

    HAXE path export

    export HAXE_PATH="/Users/me/Documents/haxe/"
    export PATH=$HAXE_PATH:"$PATH"

    HAXELIB path export

    export HAXELIB_PATH="/Users/me/Documents/haxe/"
    export PATH=$HAXELIB_PATH:"$PATH"

    HAXE_STD path export

    export HAXE_STD_PATH="/Users/me/Documents/haxe/std/"
    export PATH=$HAXE_STD_PATH:"$PATH"

    NEKO path export

    export NEKO_PATH="/Users/me/Documents/haxe/std/"
    export PATH=$NEKO_PATH:"$PATH"


  • administrators

    Hm... flixel-tools calls haxelib, and it sounds like something is wrong with running the latter. What happens when you run haxelib list / haxelib path flixel?

    I don't think HAXE_PATH and NEKO_PATH are a thing btw - it's HAXEPATH and NEKOPATH (source).



  • If i run both haxelib list and haxelib path flixel i get this error:

    Uncaught exception - load.c(237) : Failed to load library : std.ndll (dlopen(std.ndll, 1): image not found)


  • administrators

    Is NEKOPATH set correctly? Seems relevant to that error message, according to what I linked earlier:

    NEKOPATH - path to the neko installation. I believe it's needed for loading standard .ndll files.



  • Where should NEKOPATH point to? In the folder containing haxe and haxelib? in the std folder? or the folder where all the downloaded libs are stored?
    (Anyway i tried all of those three and had the same result)


  • administrators

    The folder containing the neko binary, as well as std.ndll (and other .ndll files). On Windows, that's a separate directory next to the Haxe directory (C:\HaxeToolkit\neko vs C:\HaxeToolkit\haxe), not sure what the directory structure would look like on a Mac.


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.