thx.core
thx.core copied to clipboard
Macro issue with haxeui?
Hi there!
So someone is having problems with using both hxWidgets and thx via cpp and im really not sure what it could be. Ive done some investigation but drawing blanks and not really getting anywhere, does anything here jump out to anyone: https://github.com/haxeui/hxWidgets/issues/58
Maybe someone might notice something obvious that im missing? Any help / pointers greatly appreciated!
Thanks, Ian
Hi all,
Just to give an update on this issue. I recently updated everything (haxe 4.0.1, thx.core 0.44.0, haxeui-hxwidgets 1.0.4, haxeui-core 1.0.5, hxWidgets 1.1.3, hxcpp 4.0.64) and the issue persists.
After some brute force investigation, it appears that I can prevent the error from occurring if I ensure that the following headers are not included before thx\bigint\Big.h and thx\bigint\Small.h:
wx/widgets/styles/MessageDialogStyle.h wx/widgets/styles/FileDialogStyle.h wx/widgets/styles/DirDialogStyle.h wx/widgets/styles/DialogStyle.h wx/widgets/GLOptions.h wx/widgets/Entry.h
[edit: I can, however, include them immediately afterwards]
I get a quite different error instead from later in the file, but one thing at a time, eh?
False alarm on the 'error later in the file', I was accidentally trying to build a 64-bit target without -DHXCPP_M64. I don't have any other errors in __boot__.cpp
with the #include order changed as described above. I'm not sure how to manually run the rest of the cpp compile stage on its own, so I don't know if there are any other issues in the rest of the build.
Found the problem.
The headers in question eventually include: wrapwin.h -> Windows.h ->winscard.h (because NOCRYPT is not defined) -> wtypes.h -> rpcndr.h
and at line 190 of rpcndr.h is the delightful:
#define small char
Fun!
So adding #define small char
somewhere fixes things?
No, bypassing that #define fixes things. That's not a permanent fix though. rpcndr.h looks like a pretty commonly used include in the Windows SDK, which means that on Windows, the identifier small
is effectively reserved!