Flashdevelop / HaxePunk: Build halted with errors

180 views Asked by At

I've been trying to follow this tutorial to get started with HaxePunk. I am using FlashDevelop and have got to trying to run the program after adding the logo.png. However, when I run the program I get the following output:

Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "D:\Haxe Projects\Prj_Starting\Prj_Starting.hxproj" -ipc f201d2c5-2ffe-46d4-bb54-c67a3e34ab4a -version "3.2.1" -compiler "C:\Program Files\HaxeToolkit\haxe" -library "C:\Program Files (x86)\FlashDevelop\Library" -target "neko" 
Building Prj_Starting
Running Pre-Build Command Line...
cmd: "C:\Program Files\HaxeToolkit\haxe/haxelib" run lime build "project.xml" neko -debug -Dfdb
[file_contents,C:\Program Files\HaxeToolkit\haxe\lib\lime//.current]
Build halted with errors.
Done(1)

No error specific error is given so I am unsure what is wrong. I have followed the tutorial exactly and these are my classes:

Main.hx

import com.haxepunk.Engine;
import com.haxepunk.HXP;

class Main extends Engine
{

    override public function init()
    {
#if debug
        HXP.console.enable();
#end
        HXP.scene = new MainScene();
    }

    public static function main() { new Main(); }

}

MainScene.hx

import com.haxepunk.Scene;

class MainScene extends Scene
{
    public override function begin()
    {
        add(new Logo());
    }
}

Logo.hx

package src;
import com.haxepunk.Entity;
import com.haxepunk.graphics.Image;
import com.haxepunk.utils.Input;
import com.haxepunk.utils.Key;

/**
 * Logo entity.
 * @author Abigail Smith
 */
 class Logo extends Entity
{

    private var speed:Int;

    public function new() 
    {
        super(270, 190);
        speed = 5;
        graphic = new Image("graphics/logo.png");
    }

    public override function update():Void {
        if (Input.check(Key.RIGHT)) {
            moveBy(speed, 0);
        }
        if (Input.check(Key.LEFT)) {
            moveBy(-speed, 0);
        }
        if (Input.check(Key.DOWN)) {
            moveBy(0, speed);
        }
        if (Input.check(Key.UP)) {
            moveBy(0, -speed);
        }
    }
}

Any help with this solving this error would be appreciated. Thank you :)

1

There are 1 answers

0
sercanturkmen On

It looks like you have a problem with one of the library you need that called "lime".

[file_contents,C:\Program Files\HaxeToolkit\haxe\lib\lime//.current]
  1. Open cmd and type haxelib list
  2. Check if you can see lime library there
  3. If it's there then run haxelib update lime else you need to install it by running haxelib install lime

Hope this solves your problem!