Opening a new questions as some older answer does not apply to my case.
As per subject, I cannot compile a basic wxWidgets "Hello, World" program in Windows 10 with CodeLite 14 and wxWidgets 3.1.4 (compiled using MSYS2-mingW64).
The error message is at line
C:/Users/Federico/codelite/wxHelloWorld/win_resources.rc:1:10: fatal error: wx/msw/wx.rc: No such file or directory
1 | #include "wx/msw/wx.rc"
| ^~~~~~~~~~~~~~
compilation terminated.
The resource file flags returned by wx-config running wx-config --rcflags
are:
--use-temp-file --define __WXMSW__ --define _UNICODE --include-dir C:/wx/3.1.4-msys/lib/gcc_lib/mswu --include-dir C:/wx/3.1.4-msys/include
All folders/files are properly in place. By tinkering with these flags I found that no errors are given, and the program is properly compile, if I remove the --use-temp-file
flag, like:
--define __WXMSW__ --define _UNICODE --include-dir C:/wx/3.1.4-msys/lib/gcc_lib/mswu --include-dir C:/wx/3.1.4-msys/include
Then everything works. Unfortunately, that flag is assumed by default by wx-config, so the only easy solution to not have it would be to just stop using wx-config
and manually configure all compiler flags. So:
- Is there any ways I could avoid this?
- What is that flag meant for?