Re: Help wanted to build on Windows
Posted by Shawn.Curry on May 08, 2019; 1:40am
URL: https://forum.librecad.org/Help-wanted-to-build-on-Windows-tp5717272p5717351.html
Hi Gary,
I ran into the exact same issue. It appears to be a bug in the UNICODE support. The command lines that Qt is passing to the muParser build (plus everything else - new windows configuration?) include the defines -DUNICODE and -D_UNICODE. This causes the muParser to be built for wchar instead of char.
The errors then occur due to the fact that several of the string constants used in the math cpps are not wchar (ex: L"a widechar string"). They should instead use a _TEXT("sometext") style macro to in order to support both char and wchar. Indeed, the muParserDef.h unit specifies just such a macro.
I did not see any reason that the muParser library should not be built for unicode. It appears to be the only obstacle for 100% compilation with the UNICODE flags.
My "hackaround" was to add the following to muParserDef.h:
#ifdef UNICODE
#undef UNICODE
#endif
#ifdef _UNICODE
#undef _UNICODE
#endif
That will get it to build, but the correct solution seems to be fixing the math cpps.
i'm trying to get in touch with any of the other active developers. Any ideas?