I'm working with a cross-platform C++ project on Windows and MacOS.
Due to cross-compatibility, I use the flag: -fshort-wchar in Xcode to ensure using 2 bytes instead of 4 bytes for a wide char as it is on the Windows platform. Now comes the problem.
Using Xcode 9.2 and below works fine with the flag but after updating to Xcode 9.3 or 9.4 I get Linker Error.
LLVM ERROR:
Function Import: link error
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I remove -fshort-wchar it compiles but then I get a runtime error due to using 4 byte wide chars when the code expects 2 byte.
-fshort-wchar is under Apple LLVM 9.0 Custom Compiler Flags -> Other C++ Flags
Any ideas?