SomeRanDev / reflaxe.CPP

An alternative C++ target for Haxe that generates dependent-less, GC-less C++17 code.
MIT License
72 stars 5 forks source link

@:include does not gen #include for Main.h/Main.cpp #39

Closed maihd closed 10 months ago

maihd commented 10 months ago

@:include does not gen #include for Main.h/Main.cpp, instead of that, it will generate #include for main.cpp.

Screenshots from my current project: image image image

SomeRanDev commented 10 months ago

Hello! Thanks for the report!

@:include will add includes to the file the type is used in. If you wish to add an include to the file the class is generated in, you want to use @:headerInclude or @:cppInclude.

Hope this helps!

SomeRanDev commented 10 months ago

For example, you'd want to add @:include("Application.h") to your extern class Application so that whenever that extern class is used, that file is included.

maihd commented 10 months ago

Worked! Tks. There is my project: https://github.com/maihd/pixel_adventure. Hope this will be a showcase to use Reflaxe.CPP IRL:)

maihd commented 10 months ago

Additional, after read https://all-things-andy-gavin.com/2011/03/12/making-crash-bandicoot-gool-part-9/, find out Reflaxe.CPP can be using like this approach, which proofed have advantages 2 decades ago:)

SomeRanDev commented 10 months ago

Cool, thank you for using! Sorry since Reflaxe/C++ has some missing features, but I hope you are able to find things working to your liking! 😁