MWLogging icon indicating copy to clipboard operation
MWLogging copied to clipboard

Won't compile for Objective-C++ project

Open nestserau opened this issue 9 years ago • 0 comments

It took me some time to understand the odds, but the solution is quite simple. To make the logging functions compatible with Objective-C++ it's necessary to frame their declarations with:

#ifdef __cplusplus
extern "C"
{
#endif
...
#ifdef __cplusplus
}
#endif

Details as to why it's becoming an issue once clang++ is in play: http://stackoverflow.com/a/1041880/145046

nestserau avatar Jul 13 '15 07:07 nestserau