HaxeFoundation / hashlink

A virtual machine for Haxe
https://hashlink.haxe.org/
MIT License
812 stars 158 forks source link

hl hangs #99

Closed WingmanImd closed 6 years ago

WingmanImd commented 6 years ago

Hello, I have a heaps project(the very basic one from the website) and when i try to run hl MyApp.hl it just hangs. I can see an "hl" process in task manager using quite a bit of my CPU but only ~10 MB of RAM(maybe it helps).

Any ideas?

As a side-note, when I build with hlsdl and try to run the .hl file I get: src\module.c(256) : FATAL ERROR : Failed to load library sdl.hdll even though I have downloaded SLD2 development libraries and put them in the hashlink include folder

OS: Windows 10 Haxe: Nightly HL: 1.4

Libs: heaps: [git] hl: [git] hldx: [1.4.0] hlopenal: [1.4.0] hlsdl: [1.4.0] hscript: [2.1.1] hxbit: [1.3.1]

Main.hx

class Main extends hxd.App {
    var bmp : h2d.Bitmap;
    override function init() {
        var tile = h2d.Tile.fromColor(0xFF0000, 100, 100);
        bmp = new h2d.Bitmap(tile, s2d);
        bmp.x = s2d.width * 0.5;
        bmp.y = s2d.height * 0.5;
    }
    override function update(dt:Float) {
        bmp.rotation += 0.1;
    }
    static function main() {
        new Main();
    }
}

Build script: -lib heaps -cp src -hl Main.hl -main Main -D windowSize=1024x768 -lib hxbit

josuigoa commented 6 years ago

you should add -lib hlsdl to the build script. You must explicitly tell to HL which rendering are you using (SDL, DirectX...)

ncannasse commented 6 years ago

You need -lib hlsdl, then you need to have libsdl installed on your computer (the includes are just for compiling you also need the runtime)

WingmanImd commented 6 years ago

@ncannasse What do you mean with "Have libsdl installed on your computer". If you mean to have SDL2.dll in the hashlink folder, I already have it. My problem persists, "src\module.c(256) : FATAL ERROR : Failed to load library sdl.hdll" UPDATE: got it to work by using hashlink 1.3