prev up next   top/contents search

comp.lang.c FAQ list · Question 10.10

Q: I'm using header files which accompany two different third-party libraries, and they are ``helpfully'' defining common macros such as TRUE, FALSE, Min(), and Max(), but the definitions clash with each other and with definitions I'd already established in my own header files. What can I do?


A: This is indeed an annoying situation. It's a classic namespace problem; see questions 1.9 and 1.29. 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.


prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North