[SOLVED] Error when compiling heaps to cpp Windows


#1

when using --cpp Haxe will compile no problem but if I try using Heaps it throws an error.

Main.hx

class Main extends hxd.App {
override function init() {
var tf = new h2d.Text(hxd.res.DefaultFont.get(), s2d);
tf.text = “Hello World !”;
}
static function main() {
new Main();
}
}

compile.hxml

-lib heaps
–cpp CPPBuild
-main Main

The Error

C:\HaxeToolkit\haxe\lib\heaps/1,7,0/h3d/impl/GlDriver.hx:157: characters 17-28 : Type not found : Framebuffer
C:\HaxeToolkit\haxe\lib\heaps/1,7,0/h3d/Engine.hx:17: lines 17-418 : Defined in this class
C:\HaxeToolkit\haxe\lib\heaps/1,7,0/h3d/impl/GlDriver.hx:128: characters 17-24 : Type not found : Program

My Haxelib installs

actuate: [1.8.9]
format: [3.4.2]
heaps: [1.7.0]
hldx: [1.10.0]
hlopenal: [1.5.0]
hlsdl: [1.10.0]
hscript: [2.3.0]
hxbit: [1.5.0]
hxcpp-debug-server: [dev:c:\Users\Donpa.vscode\extensions\vshaxe.hxcpp-debugger-1.2.4\hxcpp-debug-server]
hxcpp: 4.0.52 [4.0.64]
layout: [1.2.1]
minimingw: [1.0.0]
systools: [1.1.0]

And I am running Haxe 4.0.2

Thank you to anyone who can help


#2

hxcpp target is not supported by heaps. Use HL\C with your favorite C compiler (except clang on Windows/Linux).


#3

Thanks Dude, I didn’t realise hxcpp wasn’t supported. I got hashlink up and running now (was fiddly)