E.g.: A software I am working on is dependent on c-client (http://www.washington.edu/imap/). When compiling code that depends on c-client with clang, the following error is prompted:
/opt/local/include/c-client/c-client.h:36:9: error: C++ operator 'and' cannot be used as a macro name
#define and cclientAnd /* C99 doesn't realize that ISO 646 is dead */
Fortunately, there is compiler option to bypass those problems: -fms-compatibility
Although this parameter was introduced to make clang compile visual c++ headers, it also fixes problems like the one above.
No comments:
Post a Comment