I am trying to compile my project under GCC (Visual Studio compiles it flawlessly).
I have an assert user-defined function that throws a wstring message. Its part is the __FUNCTION__ macro, which I "unicode" using the WIDEN macro from MSDN
#define WIDEN2(x) L ## x
#define WIDEN(x) WIDEN2(x)
It compiles to MSVC, but it prints this to GCC:
error: ‘L__FUNCTION__’ was not declared in this scope
The only solution I could come up with is to convert the contents of __FUNCTION __ to wstring at runtime using mbstowcs, but I would like to find a compilation method for this.
Thanks for the help.
source
share