diff --git a/src/generators/hl2c.ml b/src/generators/hl2c.ml index 785156a99cf..5c5ec3576b6 100644 --- a/src/generators/hl2c.ml +++ b/src/generators/hl2c.ml @@ -1759,6 +1759,11 @@ let write_c com file (code:code) gnames num_domains = () ) all_types; + line ""; + line "#ifndef HL_DUMP_TYPES"; + line "HL_API void hl_sys_print(vbyte*);"; + line "#endif"; + line ""; line "static void dump_types( void (*fdump)( void *, int) ) {"; block ctx; @@ -1782,7 +1787,7 @@ let write_c com file (code:code) gnames num_domains = | _ -> () ) all_types; line "#else"; - sexpr "printf(\"dump_types not available, please compile with HL_DUMP_TYPES defined\\n\")"; + sexpr "hl_sys_print((vbyte*)USTR(\"dump_types not available, please compile with HL_DUMP_TYPES defined\\n\"))"; line "#endif"; unblock ctx; line "}";