HaxeFoundation / haxe.org-comments

Repository to collect comments of our haxe.org websites
2 stars 2 forks source link

[haxe.org/manual] Defines (Target Details - C++) #136

Open utterances-bot opened 10 months ago

utterances-bot commented 10 months ago

Defines (Target Details - C++) - Haxe - The Cross-platform Toolkit

Haxe is an open source toolkit based on a modern, high level, strictly typed programming language.

https://haxe.org/manual/target-cpp-defines.html

frankhdz22 commented 10 months ago

How do you set HXCPP_GC_BIG_BLOCKS? Where do you set it? project.xml? or cmd?

ibilon commented 10 months ago

You can add it to the haxe command line or hxml file with -D HXCPP_GC_BIG_BLOCKS or --define HXCPP_GC_BIG_BLOCKS. For lime/openfl project.xml that should be <define name="HXCPP_GC_BIG_BLOCKS" />.

bahmoudd commented 5 months ago

I can't seem to get Sys to work when compiling to C++

bahmoudd commented 5 months ago

error: conversion from 'DWORD' {aka 'long unsigned int'} to 'Dynamic' is ambiguous build.hxml file:

-cp src
-main Main
-D analyzer-optimize
-D mingw
-D MINGW_ROOT c:/msys64
--cpp cpp

(I have msys installed on my computer)

bahmoudd commented 5 months ago

Source Haxe code:

class Main {
    static function main():Void
    {
        Sys.println("Hello, world!");
    }
}
bahmoudd commented 5 months ago
-cp src
-main Main
-D analyzer-optimize
-D HXCPP-MINGW
-D HXCPP_WINXP_COMPAT 0
--cpp cpp

with the source code provided also outputs error: conversion from 'DWORD' {aka 'long unsigned int'} to 'Dynamic' is ambiguous

bahmoudd commented 5 months ago

(The comment above is with minimingw installed)