wxWidgets "can not find file" issue

…And yes, I know what that means, it means the compiler cannot find the file. But when wxWidgets structures its folders and files like this:

I just want to snap my laptop in two. I mean, why? Why, why, why!? Even with a find and replace to do “wx/” -> “” is going to take a long time, wxWidgets is massive. Is there a better way to compile than to do such a thing?

Is there any way to “-I” include the parent path? With such basic names (like “list.h”) they probably include the “wx/” in the include path to be sure they don’t pick up the wrong file by mistake


<files id='haxe'>
    <compilerflag value='-I../includes/wx/' />

Improved the build only slightly, with the file can not be found error no longer on window.h but now on typeinfo.h.

The error is specifically:

../includes/wx/typeinfo.h(25) : fatal error C1083: Cannot open include file: 'wx/defs.h': No such file or directory

https://github.com/tienery/hxWidgets I’ve now got it on Github for anyone who wishes to help, and I would greatly appreciate it.


Ah, I know the problem. I need hxcpp to compile with the flags: RUNTIME_LIBS=static because by default their dynamic and some files are trying to find files it shouldn’t need.

I suppose ultimately, question a) What’s the best way to tell hxcpp to first build wxWidgets, and b) to set the flags so that it builds using command line argument RUNTIME_LIBS=static instead of dynamic?

If you’re doing a full HXCPP static build, try adding -Dstatic_link to the command-line

In the OpenFL tools, this equates to the -static flag

And in the Build.xml, do you have paths to the *.lib for it to build properly? I suspect that because Waxe does that as well.

Yeah, you can check the XML and C++ files here:

Each NDLL is added as a reference in the Build.xml :slight_smile: