haxeopenflhaxelib

Build halted with errors


I have been working on Haxe project, everything has been going smooth targeting windows... Until I took break for couple of days now when I come back to do some work I get this when I try to debug or release:

Building main
Running Pre-Build Command Line...
cmd: "C:\HaxeToolkit\haxe/haxelib" run lime build "project.xml" windows -debug -Dfdb
Build halted with errors.
Done(1)

... I do not understand what is wrong, I have multiple times now reinstalled haxetoolkit, lime, openfl everything is up to date and not corrupted, I've tried HaxeDevelop and FlashDevelop, problem persists.... It happens when targeting not just windows but anything...

please, help... It is not my code, I have not done anything for couple of days and everything worked fine 2 days ago...

EDIT: I've managed to pinpoint source of problem I think. I tried to do new project from ground up, and when I edited my project.xml so that I could use .swf as my asset library, something goes wrong and it wont build... :I

Here is part of my project.xml:

    <!-- classpath, haxe libs -->
    <source path="src" />
    <haxelib name="openfl" />
    <haxelib name="swf" />
    <haxelib name="actuate" />

    <!-- assets -->
    <library path="Assets/library.swf" type="swf" preload="true" generate="true" />

    <assets path="Assets" rename="assets" exclude="openfl.svg|*.swf" />

    <icon path="assets/openfl.svg" />

    <!-- optimize output
    <haxeflag name="-dce full" /> -->

EDIT 2: It's got something to do with:

<library path="Assets/library.swf" type="swf" preload="true" generate="true" />

when I remove generate="true" and/or preload="true" I get:

Error: error running link.exe -out:ApplicationMain-debug.exe -nologo -machine:x86 -debug -subsystem:windows,5.01 -libpath:lib user32.lib @obj/msvc16-debug-ncxp/all_objs
Build halted with errors.
Done(1)

Solution

  • Lovely fellow(s) at OpenFL community helped to solve this problem. It turned out that it was a bug in latest libs, which has been solved now and will be included in next update. So, solution for now was to downgrade like so:

    haxelib set openfl 4.0.1
    haxelib set lime 3.0.1
    haxelib set swf 2.2.2
    

    and now it works as its supposed to.