Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro issue with haxeui? #262

Open
ianharrigan opened this issue Dec 27, 2018 · 5 comments
Open

Macro issue with haxeui? #262

ianharrigan opened this issue Dec 27, 2018 · 5 comments

Comments

@ianharrigan
Copy link

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: haxeui/hxWidgets#58

Maybe someone might notice something obvious that im missing? Any help / pointers greatly appreciated!

Thanks,
Ian

@iamfraggle
Copy link

iamfraggle commented Nov 11, 2019

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?

@iamfraggle
Copy link

iamfraggle commented Nov 12, 2019

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.

@iamfraggle
Copy link

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!

@ianharrigan
Copy link
Author

So adding #define small char somewhere fixes things?

@iamfraggle
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants