[SOLVED]Error When compiling HelloWorld with HL on Windows


#1

Hi everyone!
I have Haxe Compiler v4…0.3r installed, I have followed the instructions on “Hello HashLink”. When I try to build the program on windows, I get the following in the terminal:

Executing task: C:\WorkSoftware\Haxe\haxe\haxe.exe --connect 6000 compile.hxml <
C:\WorkSoftware\Haxe\haxe\lib\heaps/1,6,1/h3d/impl/DirectXDriver.hx:1198: characters 24-28 : Identifier ‘Desc’ is not part of dx.StencilOp
C:\WorkSoftware\Haxe\haxe\lib\heaps/1,6,1/h3d/impl/DirectXDriver.hx:658: characters 4-40 : Not enough arguments, expected ref:Int

My compile.hxml looks like this:

-lib heaps
-lib hldx
-hl hello.hl
-main Main

And my Main.hx is the same as in the default example:
Here’s a list of all my haxelib packages:
format: [3.4.2]
heaps: [1.6.1]
hldx: [1.10.0]
hlopenal: [1.5.0]
hxcpp-debug-server:
hxcs: [3.4.0]

And HashLink version 1.10.0
Any Idea on how to fix it?:thinking:


#2

I tried to use any other version of haxe and hashlink and all faied.
I trace the error msg and modify the error context,it worked but i don’t know how it is:

static var STENCIL_OP : Array = [
Keep,
Zero,
Replace,
IncrSat,
Incr,
DecrSat,
Decr,
//#if (hldx < “1.7.0”) Desc #else Decr #end,
Invert,
];

// #if (hldx < “1.7”)
// if( ref != 0 ) throw “DirectX Stencil support requires HL 1.7+”;
// Driver.omSetDepthStencilState(depth);
// #else
// Driver.omSetDepthStencilState(depth, ref);
// #end
Driver.omSetDepthStencilState(depth, ref);

I just comment the error code


#3

Hello, you should try installing the hlsdl library and then modify your compile.hxml to this :
-lib heaps
-lib hlsdl
-hl hello.hl
-main Main


#4

Thanks,i haven’t tried this way
I‘’m working on windows and the document says i can use -lib hldx instead. :joy:


#5

I was using directX too but last haxe version (rc-3) seemed to broke it. I had to switch on hlsdl to get things working. Commenting source code is a too brutal solution for me :joy: