🚀 New Feature in NitroPascal: {$INCLUDE_HEADER} Directive #6
jarroddavis68
started this conversation in
DevLog
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When transpiling Pascal to C++, one challenge is managing platform-specific headers without creating conflicts. For example, if you want to call Windows API functions like
MessageBoxW
, you need<windows.h>
on the C++ side. But including Windows headers globally causes conflicts with cross-platform libraries like raylib (due to functions likeCloseWindow
andDrawText
).The Solution: {$INCLUDE_HEADER}
Just added a simple directive that lets you specify which C/C++ headers to include directly from your Pascal code:
How it works:
<header.h>
) and local headers ("header.h"
)Platform-Specific Headers:
Clean, simple, and solves the header conflict problem elegantly! 💪
Beta Was this translation helpful? Give feedback.
All reactions