Error on Compile C generated files using CL.EXE


#1

Hi.

I am having problems to compile C generated files on windows.

I created a Hello World on Visual Studio Code using Haxe, Heaps, HashLink.
I can run the application (hl file) without any problems.
I can generate the C files without errors.

When I use cl.exe to compile the generated files I receive the following Error:

.\dx/Window.h(21): error C2059: syntax error: ''
.\dx/Window.h(24): error C2059: syntax error: '}'

Here is the CL command I use:

cl /Ox /Fo main /Fe main.exe -I "C:\HaxeToolkit\hashlink/include" -I "." "main.c" "C:/HaxeToolkit/hashlink/ui.lib" "C:/HaxeToolkit/hashlink/directx.lib" "C:/HaxeToolkit/hashlink/openal.lib" "C:/HaxeToolkit/hashlink/fmt.lib" "C:/HaxeToolkit/hashlink/libhl.lib"

Here is the generated file Window.h in the dx folder:

// Generated by HLC 4.0.0 (HL v5)
#ifndef INC_dx__Window
#define INC_dx__Window
typedef struct _dx__$Window *dx__$Window;
typedef struct _dx__Window *dx__Window;
#include <hl/Class.h>
#include <hl/BaseType.h>
#include <_std/String.h>
#include <hl/types/ArrayObj.h>
#include <hl/natives.h>


struct _dx__$Window {
	hl_type *$type;
hl_type* __type__;
vdynamic* __meta__;
varray* __implementedBy__;
String __name__;
vdynamic* __constructor__;
hl__types__ArrayObj windows;
int CW_USEDEFAULT;
int HIDDEN;
int RESIZABLE;
};
struct _dx__Window {
hl_type *$type;
dx_window* win;
vvirtual* savedSize;
String title;
int displayMode;
bool visible;
bool vsync;
};

#endif

Also, I tried the @Yanrishatum HLCC but it got the same compilation error.

Am I missing something?

Regards.