A third-party header file I just started using is defining its own TRUE and FALSE values incompatibly ...

Q

A third-party header file I just started using is defining its own TRUE and FALSE values incompatibly with the code I've already developed. What can I do?

✍: Guest

A

This is indeed an annoying situation. It's a classic namespace problem;Ideally, third-party vendors would be conscientious when defining symbols (both preprocessor #defines and global variable and function names) to assure that namespace collisions were unlikely. The best solution is to get the vendor(s) to fix their header files.
As a workaround, you can sometimes undefine or redefine the offending macros between the conflicting #include directives.

2016-02-26, 518👍, 0💬