Skip to content

Instantly share code, notes, and snippets.

@Yanrishatum
Last active April 8, 2023 15:50
Show Gist options
  • Star 27 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Yanrishatum/d69ed72e368e35b18cbfca726d81279a to your computer and use it in GitHub Desktop.
Save Yanrishatum/d69ed72e368e35b18cbfca726d81279a to your computer and use it in GitHub Desktop.
How to compile HL/C

How to compile HL/C

Prepwork/terms

Because I have no trust in people.

  • <hashlink> points to your installation of Hashlink, e.g. folder in which hl.exe (or Unix executable) is, alongside with library binaries (.hdll files), and include folder.
  • <src> points to the folder containing generated HL/C sources. One that contains hlc.json file.
  • <app> refers to your output executable name, including extension.
  • <main> refers to your entry-point file name, including extension (see below).
  • I provide example of doing it on Windows via MSVC cl.exe, but Unix should be more or less same with replacement of argument flags and compiler.
  • I expect that you DO have a compiler installed and can call cl.exe or other compiler from command-line.
  • As far as I'm aware - static linking of libraries not possible atm.
  • hlc.json contains information you need in order to compile the sources. It's contents are referenced as <hlc.*>. <hlc.libs> for example.
    • version tells what format version this hlc.json is. Instructions are based on version 4000, but should work on newer ones if they are to follow.
    • libs array contains the list of referenced hdll libraries.
    • defines provide defines used during compilation, and can be safely ignored.
    • files array contains all generated files, with first file always being the entry-point.
  • std library as a file is libhl.dll, not std.hdll.
  • Some libraries need you to copy dependency files alongside the hdll file.
    • sdl -> SDL2.dll
    • openal -> OpenAL32.dll
  • If you are using any external hdll libraries - find them in respective library locations.

Generating HLC

First of all, to generate HLC sources instead of HL bytecode you just replace -hl command extension from .hl to .c. That name also will be your entry-point file name. And be sure to use subfolder (-hl hlc/game.c), because you don't want to pollute your root with .c output ;)

MSVC

General template

cl.exe /Ox /Fe <app> -I "<hashlink>\include" -I "<src>" "<src>\<main>" "<hashlink>\libhl.lib" ...libs

Meaning

  • /Fe <app>: Output to an executable, for example /Fe game.exe would produce a game.exe executable in cwd.
  • -I "<hashlink>\include": Includes hashlink headers, as they are mandatory in order to compile.
  • -I "<src>": Includes source files.
  • "<src>\<main>": Specifies entry-point.
  • Libraries: Here you should link all libraries that are listed in <hlc.libs>. At the very least it's libhl.lib, but in case of Heaps - it expands to at least fmt.lib, ui.lib, openal.lib, and sdl.lib or directx.lib.
  • /Ox is optional optimization flag.

Command sample

cl.exe /Ox /Fe app.exe -I "%hashlink%\include" -I "hlc" "hlc\app.c" "%hashlink%\ssl.lib" "%hashlink%\directx.lib" "%hashlink%\openal.lib" "%hashlink%\fmt.lib" "%hashlink%\libhl.lib"

Notes

Make sure you're running 64-bit MSVC on newer Hashlink, because it defaults to 32-bit if you're running MSVC dev shell.

GCC

Note: This is untested. Ping me in discord if there are errors or if it worked for you.

General template

gcc -O3 -o <app> -std=c11 -I <src> <src>/<main> -lhl /usr/local/lib/libhl.so ...libs

Meaning

  • -o <app>: Output to an executable.
  • -std=c11: Some mandatory GCC stuff. ;)
  • -I <src>: Includes source files.
  • <src>/<main>: Specified entry-point.
  • -lhl: Includes hashlink includes via -l flag. Alternatively should work with -I <hashlink>/include.
  • Libraries: See above. Note that for unix systems it should be .hdll / .so instead of .lib, depending on which library you refer to. Also if you can't be assed: Include all hdlls possible, see below.
  • -O3 is optional optimization flag.

Command sample

gcc -O3 -o app -std=c11 -I out hlc/app.c -lhl /usr/local/lib/*.hdll

Bundling

To get your compilation portable, you should not forget to copy over all linked .hdll files near executable, as well as libhl and all dependency libraries (sdl/openal).

??????

Profit!

That's it. Really. There's nothing more to it.

Ma, I can't get assed to do this shit!

Well, I don't give a damn. Sucks to be you I guess. ¯\_(ツ)_/¯

Aka alternative approaches.

Windows visual studio template

haxelib install hashlink # Install HL support library.
haxelib run hashlink build <src> -D hlgen.makefile=vs2015 # Generate template

Then just open your vs project file and compile.

Bundle Hashlink with the game

  • Route A: Rename your .hl to hlboot.dat and run hl.exe (Afaik, DeadCells used this before switching to precompiled HLC)
  • Route B: Use cmd file that just does hl game.hl (I use that approach for development builds internally)
@Syopic
Copy link

Syopic commented Oct 1, 2020

This tutorial helped me a lot. Thanks!

@nyash
Copy link

nyash commented Oct 17, 2020

Thanks.

This is what worked for me on Windows with MinGW64 to compile a haxe file that just prints "hello world".

MinGW64 was installed to: C:\Program Files\mingw-w64
Haxe was installed to: C:\HaxeToolkit
Hashlink was installed to: C:\HaxeToolkit\hl

Files:
C:\myproject
--- out
------ main.c
------ other files/folders generated by compiling Main.hx by hashlink/c.
--- Main.hx
--- compile.hxml

compile.hxml contents:
#entry point
-main Main
#output
--hl out/main.c

gcc command used from within C:\myproject:
gcc out/main.c -O3 -o main -std=c11 -I"out" -I"C:\HaxeToolkit\hl\include" -L"C:\HaxeToolkit\hl" -l:libhl.lib -ldbghelp -municode

@jerrygreen
Copy link

I'm trying to do this on Windows 10, but can't compile it into executables...

gcc way

I use:

export HL="/c/HaxeToolkit/hl-1.11.0-win"
gcc out/main.c \
  -O3 \
  -o app \
  -std=c11 \
  -I "out" \
  -I "${HL}/include" \
  -lhl "${HL}"

But I face this error:

Jerry@Jerry-PC MINGW64 ~/projects/heaps-examples/heaps-game (master)
$ ./compile.sh
In file included from C:/HaxeToolkit/hl-1.11.0-win/include/hlc.h:26,
                 from out/main.c:3:
C:/HaxeToolkit/hl-1.11.0-win/include/hl.h:243:11: fatal error: uchar.h: No such file or directory
  243 | # include <uchar.h>
      |           ^~~~~~~~~
compilation terminated.

I spent hours trying to make it work, but no success. After some googling I've found it should be part of c11 standard (that I already use), and some say that I need libicu-devel lib (which I already installed with Cygwin; btw I also tried it via MinGW too), but again and again I face this uchar.h error.

I found it manually here: /c/cygwin64/usr/include/unicode/uchar.h, so it seems it's not included in std somehow, and I'm not sure why.

cl.exe way

I used:

export HL="/c/HaxeToolkit/hl-1.11.0-win"
cl /Ox /Fe app.exe -I "${HL}\include" -I "out" "out\main.c" "${HL}\ssl.lib" "${HL}\directx.lib" "${HL}\openal.lib" "${HL}\fmt.lib" "${HL}\libhl.lib"

But I faced some different error:

Jerry@Jerry-PC MINGW64 ~/projects/heaps-examples/heaps-game (master)
$ ./compile.sh
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9024 : unrecognized source file type 'C:/Program Files/Git/Ox', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/Program Files/Git/Fe', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'app.exe', object file assumed
main.c
C:/HaxeToolkit/hl-1.11.0-win/include\hlc.h(25): fatal error C1083: Cannot open include file: 'math.h': No such file or directory

Would appreciate any help here.

@nyash
Copy link

nyash commented Oct 27, 2020

@jerrygreen

For MSVC (under Visual Studio 2019) this works for me for Heaps on Windows 10:

First, load the environment variables necessary for cl.exe to work properly

  • Either open cmd.exe and load the bat file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Auxiliary\Build\vcvars64.bat
  • Or in start menu search for: x64 Native Tools Command Prompt for VS 2019 Preview (this will open a console window with the
    environment ready)

image

Then inside that console window (assuming the same directory/file layout I mentioned in my previous comment) run:

cl.exe out\main.c /Fe:main.exe /Ox -I C:\HaxeToolkit\hl\include -I out C:\HaxeToolkit\hl*.lib

(note I am using a wildcard for .lib files, but you can specify manually whatever is needed)

For MINGW gcc this is what works for me for Heaps, HOWEVER main.exe immediatelly segfaults on startup, so perhaps there is something wrong that I am doing.

gcc out/main.c -O3 -o main -std=c11 -I"out" -I"C:\HaxeToolkit\hl\include" -L"C:\HaxeToolkit\hl" -l:libhl.lib -l:hl.lib -l:directx.lib -l:sdl.lib -l:openal.lib -l:ssl.lib -l:ui.lib -l:uv.lib -l:fmt.lib -l:mysql.lib -l:sqlite.lib -ldbghelp -municode

(note I included all the libraries, obviously just put what is necessary).

@jerrygreen
Copy link

@nyash I'm getting this output:

C:\Users\Jerry\projects\heaps-examples\heaps-game>cl out/main.c /Ox /Fe:app.exe -I "C:\HaxeToolkit\hl-1.11.0-win\include" -I "out" "C:\HaxeToolkit\hl-1.11.0-win\ssl.lib" "C:\HaxeToolkit\hl-1.11.0-win\directx.lib" "C:\HaxeToolkit\hl-1.11.0-win\openal.lib" "C:\HaxeToolkit\hl-1.11.0-win\fmt.lib" "C:\HaxeToolkit\hl-1.11.0-win\libhl.lib"
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

main.c
Microsoft (R) Incremental Linker Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:app.exe
main.obj
C:\HaxeToolkit\hl-1.11.0-win\ssl.lib
C:\HaxeToolkit\hl-1.11.0-win\directx.lib
C:\HaxeToolkit\hl-1.11.0-win\openal.lib
C:\HaxeToolkit\hl-1.11.0-win\fmt.lib
C:\HaxeToolkit\hl-1.11.0-win\libhl.lib
main.obj : error LNK2001: unresolved external symbol sdl_gl_tex_image2d_multisample
main.obj : error LNK2001: unresolved external symbol sdl_is_cursor_visible
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_renderbuffer
main.obj : error LNK2001: unresolved external symbol sdl_gl_init
main.obj : error LNK2001: unresolved external symbol sdl_gl_vertex_attrib_divisor
The rest errors
main.obj : error LNK2001: unresolved external symbol sdl_gl_query_result_available
main.obj : error LNK2001: unresolved external symbol sdl_gl_framebuffer_texture2d
main.obj : error LNK2001: unresolved external symbol sdl_gl_bind_frag_data_location
main.obj : error LNK2001: unresolved external symbol sdl_gl_generate_mipmap
main.obj : error LNK2001: unresolved external symbol sdl_gl_draw_elements_instanced
main.obj : error LNK2001: unresolved external symbol sdl_gl_vertex_attrib_ipointer
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_shader_info_bytes
main.obj : error LNK2001: unresolved external symbol ui_ui_loop
main.obj : error LNK2001: unresolved external symbol sdl_gl_framebuffer_renderbuffer
main.obj : error LNK2001: unresolved external symbol sdl_quit
main.obj : error LNK2001: unresolved external symbol sdl_win_set_size
main.obj : error LNK2001: unresolved external symbol sdl_gl_compile_shader
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_buffer
main.obj : error LNK2001: unresolved external symbol sdl_hint_value
main.obj : error LNK2001: unresolved external symbol sdl_win_create_ex
main.obj : error LNK2001: unresolved external symbol sdl_gl_draw_arrays
main.obj : error LNK2001: unresolved external symbol ui_ui_choose_file
main.obj : error LNK2001: unresolved external symbol sdl_gl_disable_vertex_attrib_array
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_config_parameter
main.obj : error LNK2001: unresolved external symbol sdl_gl_attach_shader
main.obj : error LNK2001: unresolved external symbol sdl_gl_uniform4fv
main.obj : error LNK2001: unresolved external symbol ui_ui_start_sentinel
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_vertex_array
main.obj : error LNK2001: unresolved external symbol sdl_gl_framebuffer_texture_layer
main.obj : error LNK2001: unresolved external symbol sdl_gl_vertex_attrib_pointer
main.obj : error LNK2001: unresolved external symbol sdl_gl_cull_face
main.obj : error LNK2001: unresolved external symbol sdl_gl_bind_framebuffer
main.obj : error LNK2001: unresolved external symbol sdl_gl_delete_framebuffer
main.obj : error LNK2001: unresolved external symbol sdl_gl_query_result
main.obj : error LNK2001: unresolved external symbol sdl_gl_stencil_mask_separate
main.obj : error LNK2001: unresolved external symbol sdl_show_cursor
main.obj : error LNK2001: unresolved external symbol sdl_gl_tex_image2d
main.obj : error LNK2001: unresolved external symbol sdl_gl_use_program
main.obj : error LNK2001: unresolved external symbol sdl_gl_buffer_sub_data
main.obj : error LNK2001: unresolved external symbol sdl_event_loop
main.obj : error LNK2001: unresolved external symbol sdl_gl_uniform1i
main.obj : error LNK2001: unresolved external symbol sdl_gl_buffer_data
main.obj : error LNK2001: unresolved external symbol ui_ui_init
main.obj : error LNK2001: unresolved external symbol sdl_gl_finish
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_query
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_framebuffer
main.obj : error LNK2001: unresolved external symbol ui_ui_winlog_new
main.obj : error LNK2001: unresolved external symbol sdl_free_cursor
main.obj : error LNK2001: unresolved external symbol sdl_gl_polygon_mode
main.obj : error LNK2001: unresolved external symbol sdl_gl_delete_texture
main.obj : error LNK2001: unresolved external symbol sdl_win_render_to
main.obj : error LNK2001: unresolved external symbol sdl_gl_renderbuffer_storage
main.obj : error LNK2001: unresolved external symbol sdl_gl_blend_func_separate
main.obj : error LNK2001: unresolved external symbol sdl_gl_disable
main.obj : error LNK2001: unresolved external symbol sdl_win_resize
main.obj : error LNK2001: unresolved external symbol sdl_gl_bind_buffer_base
main.obj : error LNK2001: unresolved external symbol sdl_win_get_position
main.obj : error LNK2001: unresolved external symbol sdl_gl_renderbuffer_storage_multisample
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_shader_parameter
main.obj : error LNK2001: unresolved external symbol sdl_gl_bind_buffer
main.obj : error LNK2001: unresolved external symbol ui_ui_sentinel_pause
main.obj : error LNK2001: unresolved external symbol sdl_gl_end_query
main.obj : error LNK2001: unresolved external symbol sdl_win_get_max_size
main.obj : error LNK2001: unresolved external symbol ui_ui_sentinel_is_paused
main.obj : error LNK2001: unresolved external symbol sdl_gl_tex_image3d
main.obj : error LNK2001: unresolved external symbol sdl_gl_enable_vertex_attrib_array
main.obj : error LNK2001: unresolved external symbol sdl_gl_bind_renderbuffer
main.obj : error LNK2001: unresolved external symbol sdl_win_swap_window
main.obj : error LNK2001: unresolved external symbol sdl_gl_buffer_data_size
main.obj : error LNK2001: unresolved external symbol sdl_gl_draw_arrays_instanced
main.obj : error LNK2001: unresolved external symbol sdl_gl_delete_vertex_array
main.obj : error LNK2001: unresolved external symbol sdl_gl_compressed_tex_image3d
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_program_parameter
main.obj : error LNK2001: unresolved external symbol sdl_detect_keyboard_layout
main.obj : error LNK2001: unresolved external symbol ui_ui_winlog_set_text
main.obj : error LNK2001: unresolved external symbol sdl_gl_draw_buffers
main.obj : error LNK2001: unresolved external symbol sdl_set_vsync
main.obj : error LNK2001: unresolved external symbol sdl_win_set_title
main.obj : error LNK2001: unresolved external symbol sdl_gl_draw_elements
main.obj : error LNK2001: unresolved external symbol sdl_free_surface
main.obj : error LNK2001: unresolved external symbol sdl_get_devices
main.obj : error LNK2001: unresolved external symbol ui_ui_sentinel_tick
main.obj : error LNK2001: unresolved external symbol sdl_gl_viewport
main.obj : error LNK2001: unresolved external symbol sdl_gctrl_get_button
main.obj : error LNK2001: unresolved external symbol sdl_gctrl_open
main.obj : error LNK2001: unresolved external symbol sdl_gl_clear_stencil
main.obj : error LNK2001: unresolved external symbol sdl_gl_framebuffer_texture
main.obj : error LNK2001: unresolved external symbol sdl_set_relative_mouse_mode
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_program
main.obj : error LNK2001: unresolved external symbol sdl_gl_stencil_func_separate
main.obj : error LNK2001: unresolved external symbol sdl_win_set_position
main.obj : error LNK2001: unresolved external symbol sdl_gl_memory_barrier
main.obj : error LNK2001: unresolved external symbol sdl_win_get_min_size
main.obj : error LNK2001: unresolved external symbol sdl_gl_tex_parameterf
main.obj : error LNK2001: unresolved external symbol sdl_gl_shader_source
main.obj : error LNK2001: unresolved external symbol sdl_gl_bind_texture
main.obj : error LNK2001: unresolved external symbol sdl_detect_win32
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_uniform_location
main.obj : error LNK2001: unresolved external symbol sdl_gl_enable
main.obj : error LNK2001: unresolved external symbol sdl_gl_stencil_op_separate
main.obj : error LNK2001: unresolved external symbol sdl_set_cursor
main.obj : error LNK2001: unresolved external symbol sdl_gl_is_context_lost
main.obj : error LNK2001: unresolved external symbol sdl_gl_read_pixels
main.obj : error LNK2001: unresolved external symbol sdl_win_get_size
main.obj : error LNK2001: unresolved external symbol sdl_gl_depth_func
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_texture
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_shader
main.obj : error LNK2001: unresolved external symbol ui_ui_stop_loop
main.obj : error LNK2001: unresolved external symbol sdl_haptic_rumble_play
main.obj : error LNK2001: unresolved external symbol sdl_win_get_glcontext
main.obj : error LNK2001: unresolved external symbol sdl_gl_scissor
main.obj : error LNK2001: unresolved external symbol sdl_gl_begin_query
main.obj : error LNK2001: unresolved external symbol sdl_gl_blend_equation
main.obj : error LNK2001: unresolved external symbol ui_ui_dialog
main.obj : error LNK2001: unresolved external symbol sdl_gl_blend_equation_separate
main.obj : error LNK2001: unresolved external symbol sdl_win_set_max_size
main.obj : error LNK2001: unresolved external symbol sdl_gl_bind_vertex_array
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_attrib_location
main.obj : error LNK2001: unresolved external symbol sdl_gl_clear
main.obj : error LNK2001: unresolved external symbol sdl_gctrl_get_id
main.obj : error LNK2001: unresolved external symbol sdl_gl_color_mask
main.obj : error LNK2001: unresolved external symbol sdl_haptic_close
main.obj : error LNK2001: unresolved external symbol sdl_gl_multi_draw_elements_indirect
main.obj : error LNK2001: unresolved external symbol sdl_gl_delete_shader
main.obj : error LNK2001: unresolved external symbol sdl_gl_blend_func
main.obj : error LNK2001: unresolved external symbol ui_ui_button_new
main.obj : error LNK2001: unresolved external symbol sdl_gctrl_close
main.obj : error LNK2001: unresolved external symbol sdl_gl_pixel_storei
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_error
main.obj : error LNK2001: unresolved external symbol sdl_get_screen_width
main.obj : error LNK2001: unresolved external symbol ui_ui_win_destroy
main.obj : error LNK2001: unresolved external symbol sdl_win_set_min_size
main.obj : error LNK2001: unresolved external symbol sdl_win_get_opacity
main.obj : error LNK2001: unresolved external symbol sdl_haptic_rumble_init
main.obj : error LNK2001: unresolved external symbol sdl_init_once
main.obj : error LNK2001: unresolved external symbol sdl_gl_delete_renderbuffer
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_program_info_bytes
main.obj : error LNK2001: unresolved external symbol sdl_cursor_create
main.obj : error LNK2001: unresolved external symbol sdl_gl_options
main.obj : error LNK2001: unresolved external symbol sdl_gl_clear_color
main.obj : error LNK2001: unresolved external symbol sdl_gctrl_count
main.obj : error LNK2001: unresolved external symbol sdl_gctrl_get_axis
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_uniform_block_index
main.obj : error LNK2001: unresolved external symbol sdl_gctrl_get_name
main.obj : error LNK2001: unresolved external symbol sdl_gl_active_texture
main.obj : error LNK2001: unresolved external symbol sdl_win_destroy
main.obj : error LNK2001: unresolved external symbol sdl_gl_get_string
main.obj : error LNK2001: unresolved external symbol sdl_gl_query_counter
main.obj : error LNK2001: unresolved external symbol sdl_gl_tex_parameteri
main.obj : error LNK2001: unresolved external symbol sdl_gl_uniform_matrix4fv
main.obj : error LNK2001: unresolved external symbol sdl_win_set_fullscreen
main.obj : error LNK2001: unresolved external symbol sdl_gl_compressed_tex_image2d
main.obj : error LNK2001: unresolved external symbol sdl_gl_delete_query
main.obj : error LNK2001: unresolved external symbol sdl_gl_delete_buffer
main.obj : error LNK2001: unresolved external symbol sdl_get_screen_height
main.obj : error LNK2001: unresolved external symbol sdl_delay
main.obj : error LNK2001: unresolved external symbol sdl_gl_read_buffer
main.obj : error LNK2001: unresolved external symbol sdl_win_create
main.obj : error LNK2001: unresolved external symbol sdl_message_box
main.obj : error LNK2001: unresolved external symbol sdl_gl_dispatch_compute
main.obj : error LNK2001: unresolved external symbol sdl_gl_uniform_block_binding
main.obj : error LNK2001: unresolved external symbol sdl_gl_clear_depth
main.obj : error LNK2001: unresolved external symbol sdl_cursor_create_system
main.obj : error LNK2001: unresolved external symbol sdl_win_set_opacity
main.obj : error LNK2001: unresolved external symbol sdl_haptic_open
main.obj : error LNK2001: unresolved external symbol sdl_gl_link_program
main.obj : error LNK2001: unresolved external symbol sdl_surface_from
main.obj : error LNK2001: unresolved external symbol sdl_gl_depth_mask
main.obj : error LNK2001: unresolved external symbol sdl_gl_blit_framebuffer
main.obj : error LNK2019: unresolved external symbol __imp_sdl_cursor_create referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_cursor_create_system referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_detect_keyboard_layout referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_detect_win32 referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_event_loop referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_free_cursor referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_free_surface referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gctrl_close referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gctrl_count referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gctrl_get_axis referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gctrl_get_button referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gctrl_get_id referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gctrl_get_name referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gctrl_open referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_get_devices referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_get_screen_height referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_get_screen_width referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_active_texture referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_attach_shader referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_begin_query referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_bind_buffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_bind_buffer_base referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_bind_frag_data_location referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_bind_framebuffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_bind_renderbuffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_bind_texture referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_bind_vertex_array referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_blend_equation referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_blend_equation_separate referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_blend_func referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_blend_func_separate referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_buffer_data referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_buffer_data_size referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_buffer_sub_data referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_clear referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_clear_color referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_clear_depth referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_clear_stencil referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_color_mask referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_compile_shader referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_compressed_tex_image2d referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_create_buffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_create_framebuffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_create_program referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_create_query referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_create_renderbuffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_create_shader referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_create_texture referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_create_vertex_array referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_cull_face referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_delete_buffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_delete_query referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_delete_renderbuffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_delete_shader referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_delete_texture referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_depth_func referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_depth_mask referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_disable referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_disable_vertex_attrib_array referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_draw_buffers referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_draw_elements referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_draw_elements_instanced referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_enable referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_enable_vertex_attrib_array referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_end_query referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_finish referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_framebuffer_renderbuffer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_framebuffer_texture2d referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_framebuffer_texture_layer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_generate_mipmap referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_attrib_location referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_config_parameter referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_error referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_program_info_bytes referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_program_parameter referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_shader_info_bytes referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_shader_parameter referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_string referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_uniform_block_index referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_get_uniform_location referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_init referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_is_context_lost referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_link_program referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_multi_draw_elements_indirect referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_options referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_pixel_storei referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_polygon_mode referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_query_counter referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_query_result referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_query_result_available referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_read_pixels referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_renderbuffer_storage referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_scissor referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_shader_source referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_stencil_func_separate referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_stencil_mask_separate referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_stencil_op_separate referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_tex_image2d referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_tex_image3d referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_tex_parameteri referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_uniform1i referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_uniform4fv referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_uniform_block_binding referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_use_program referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_vertex_attrib_divisor referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_vertex_attrib_pointer referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_gl_viewport referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_haptic_close referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_haptic_open referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_haptic_rumble_init referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_haptic_rumble_play referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_hint_value referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_init_once referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_message_box referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_set_cursor referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_set_vsync referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_show_cursor referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_surface_from referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_create_ex referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_destroy referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_get_glcontext referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_get_max_size referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_get_min_size referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_get_opacity referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_get_position referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_get_size referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_render_to referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_resize referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_set_fullscreen referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_set_max_size referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_set_min_size referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_set_opacity referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_set_position referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_set_size referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_set_title referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_sdl_win_swap_window referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_button_new referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_choose_file referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_dialog referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_init referenced in function hl_entry_point
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_loop referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_sentinel_is_paused referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_sentinel_pause referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_sentinel_tick referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_start_sentinel referenced in function hl_entry_point
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_stop_loop referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_win_destroy referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_winlog_new referenced in function hl_init_hashes
main.obj : error LNK2019: unresolved external symbol __imp_ui_ui_winlog_set_text referenced in function hl_init_hashes
app.exe : fatal error LNK1120: 318 unresolved externals

I wonder how those /Ox /Fe flags are working, never seen attributes starting with /, seems like some odd feature. I've used them as you suggest there though, and I've used "Cross Tools Command Prompt" instead of bash, and at least it started doing something, and generated some main.obj binary file, but yet: still fails with many errors and still no executables :(

@nyash
Copy link

nyash commented Oct 27, 2020

@nyash I'm getting this output:

C:\Users\Jerry\projects\heaps-examples\heaps-game>cl out/main.c /Ox /Fe:app.exe -I "C:\HaxeToolkit\hl-1.11.0-win\include" -I "out" "C:\HaxeToolkit\hl-1.11.0-win\ssl.lib" "C:\HaxeToolkit\hl-1.11.0-win\directx.lib" "C:\HaxeToolkit\hl-1.11.0-win\openal.lib" "C:\HaxeToolkit\hl-1.11.0-win\fmt.lib" "C:\HaxeToolkit\hl-1.11.0-win\libhl.lib"
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

main.c
Microsoft (R) Incremental Linker Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:app.exe
main.obj
C:\HaxeToolkit\hl-1.11.0-win\ssl.lib
C:\HaxeToolkit\hl-1.11.0-win\directx.lib
C:\HaxeToolkit\hl-1.11.0-win\openal.lib
C:\HaxeToolkit\hl-1.11.0-win\fmt.lib
C:\HaxeToolkit\hl-1.11.0-win\libhl.lib
main.obj : error LNK2001: unresolved external symbol sdl_gl_tex_image2d_multisample
main.obj : error LNK2001: unresolved external symbol sdl_is_cursor_visible
main.obj : error LNK2001: unresolved external symbol sdl_gl_create_renderbuffer
main.obj : error LNK2001: unresolved external symbol sdl_gl_init
main.obj : error LNK2001: unresolved external symbol sdl_gl_vertex_attrib_divisor

The rest errors
I wonder how those /Ox /Fe flags are working, never seen attributes starting with /, seems like some odd feature. I've used them as you suggest there though, and I've used "Cross Tools Command Prompt" instead of bash, and at least it started doing something, and generated some main.obj binary file, but yet: still fails with many errors and still no executables :(

From the looks of it, you are missing "C:\HaxeToolkit\hl-1.11.0-win\sdl.lib" in cl.exe command. (Linker fails to find sdl_ functions).

Regarding the flags to cl.exe, that's the style used by a lot of windows batch programs.

@jerrygreen
Copy link

jerrygreen commented Oct 27, 2020

@nyash, oh, you're right! I've just added it, along with ui.lib, and it worked!

However, I find two inconveniences here:

  1. The final executable is a command prompt.
    And this command prompt creates a new window with actual game, so there's two windows running... Weird. How is that possible to get rid of this command prompt, leaving the game window only?

  2. Usage of "Native Tools Command Prompt" instead of bash when compiling.
    By adding /c/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64" to my environment variables, I made cl.exe visible in bash, but by running the same command, it still stucks into Cannot open include file: 'math.h': No such file or directory error I mentioned earlier, so it seems it lacks some part of environment of this "Native Tools Command Prompt"... How can I compile it with bash, directly from Visual Studio Code, from an integrated terminal, instead of this "Native Tools Command Prompt"?

RE /Ox /Fe and such flags, - I may probably seen it long before, but last several years I was using macos and linux, so they seem weird to me, because I've seen only -flag, --flag and --flag=value approaches :)

@nyash
Copy link

nyash commented Oct 28, 2020

@nyash, oh, you're right! I've just added it, along with ui.lib, and it worked!

However, I find two inconveniences here:

  1. The final executable is a command prompt.
    And this command prompt creates a new window with actual game, so there's two windows running... Weird. How is that possible to get rid of this command prompt, leaving the game window only?
  2. Usage of "Native Tools Command Prompt" instead of bash when compiling.
    By adding /c/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64" to my environment variables, I made cl.exe visible in bash, but by running the same command, it still stucks into Cannot open include file: 'math.h': No such file or directory error I mentioned earlier, so it seems it lacks some part of environment of this "Native Tools Command Prompt"... How can I compile it with bash, directly from Visual Studio Code, from an integrated terminal, instead of this "Native Tools Command Prompt"?

RE /Ox /Fe and such flags, - I may probably seen it long before, but last several years I was using macos and linux, so they seem weird to me, because I've seen only -flag, --flag and --flag=value approaches :)

  1. Hm... you are right. I spent some time on it, and there are two solutions.
    a) You can insert hl.UI.closeConsole(); inside your heaps Main classes' init function. (Not ideal, because the console will still be visible for a split second).
    b) We need to change the subsystem (by adding a parameter to cl.exe) from console (meant for console apps (default) - the reason why the console window is visible in the first place) to windows (meant for gui apps) when compiling with cl.exe

So the entire command (from my examples) would be:

cl.exe out\main.c /Fe:main.exe /Ox -I C:\HaxeToolkit\hl\include -I out C:\HaxeToolkit\hl*.lib /link /subsystem:windows

However, the chances are you will see an error like: "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@yahxz)
main.exe : fatal error LNK1120

Apparently, the hlc_main.c file that is included with the hashlink installation that I have unpacked to C:\HaxeToolkit\hl\include lacks a WinMain function which is a required entry point for gui apps on windows.

But on github I can see that such declarations were added to hashlink, so if you get the above error, do the following:

  1. Copy the contents of hlc_main.c from https://github.com/HaxeFoundation/hashlink/blob/f5e7b4ffb50bcad13945cc536ee049b38ee8d771/src/hlc_main.c
  2. Paste them to your location where you keep hlc_main.c (In my case it's under C:\HaxeToolkit\hl\include\hlc_main.c)
  3. Rebuild heaps app and Compile again with cl.exe

After these steps the console window is completely gone.

@jerrygreen
Copy link

@nyash, just tried this new hlc_main.c, and heck, that worked! No command prompt now, just a game :) That's so hacky though... Thx.

Copy link

ghost commented Mar 4, 2022

i managed to build using mingw-w64 on windows and it run perfectly
im using a simple heaps project that show text on the screen

gcc out/main.c -o main.exe -std=c11 -I out -I C:\HaxeToolkit\hashlink\include -L C:\HaxeToolkit\hashlink\ C:\Windows\System32\dbghelp.dll C:\HaxeToolkit\hashlink\*.hdll -libhl

@Pasha-Makarenko
Copy link

I using hlc-compilerhttps://github.com/fal-works/hlc-compiler.
My command in conlose:

haxelib run hlc-compiler --srcDir bin --srcFile app.c --outFile redist/app.exe --hlcJsonFile hlc.json --hlLibDir C:/HaxeToolkit/hl --hlIncludeDir C:/HaxeToolkit/hl/include --copyRuntimeFiles --exFile C:/Windows/System32/dbghelp.dll --saveCmd redist/run_gcc.bat -w --relative --compiler gcc

and this command compiling c code to exe, but when i opened exe file i saw many green lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment