title: #include <mysql.h> & #include <my_global.h> causes compilation error
body: <p>So I am working with an older copy of the SMAUG MUD codebase, I am currently implementing MySQL Database support and I am hitting a wall: As soon as I include the MySQL C API header files in the code-base I get the following errors: </p>
  
  <pre><code>[darkston@harbinger src]$ make
  make[1]: Entering directory `/home/mud/darkston/devel/mud/src'
  Compiling accounts.cpp...
  g++ -MD -c -Wall --pedantic -Wno-long-long -DSHARED_STR_NO_STRICMP -g3 -I/home/mud/darkston/include -I/home/mud/darkston/include -I/home/mud/darkston/include -I/usr/include/mysql -o .o/accounts.o accounts.cpp
  /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_deque.h: In member function ‘void std::_Deque_base&lt;_Tp, _Alloc&gt;::_M_initialize_map(size_t)’:
  /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_deque.h:469: error: expected unqualified-id before ‘(’ token
  /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/deque.tcc: In member function ‘void std::deque&lt;_Tp, _Alloc&gt;::_M_reallocate_map(size_t, bool)’:
  /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/deque.tcc:747: error: expected unqualified-id before ‘(’ token
  make[1]: *** [.o/accounts.o] Error 1
  make[1]: Leaving directory `/home/mud/darkston/devel/mud/src'
  make: *** [all] Error 2
  </code></pre>
  
  <p>I have not added any other code to the program other than</p>
  
  <pre><code>#include &lt;my_global.h&gt;
  #include &lt;mysql.h&gt;
  </code></pre>
  
  <p>I googled around a bit and a lot of people are saying that there is an issue with the 'min' and 'max' macros, but there are no 'min' or 'max macros in the source code. To be double sure, I #ifndef blocked all the utility macros available--</p>
  
  <pre><code>#ifndef UMIN
  #define UMIN(a, b)      ((a) &lt; (b) ? (a) : (b))
  #endif
  
  #ifndef UMAX
  #define UMAX(a, b)      ((a) &gt; (b) ? (a) : (b))
  #endif
  ... etc
  </code></pre>
  
  <p>Still gives me the same errors.</p>
  
  <p>I'm using GCC ver 4.1.2</p>
  
  <p>Any ideas?</p>
  
  <p>::EDIT::
  OK, I got it to work-- Unfortunately, none of the answers you guys gave got it to work, so I had to just isolate it from the rest of the program and create an interface to the interface that connects the two. I moved</p>
  
  <pre><code>#include &lt;mysql.h&gt;
  #include &lt;my_global.h&gt;
  </code></pre>
  
  <p>to my own file mysqlAPI.cpp and created functions to access what I need, thus isolating it from everything else.</p>
  
  <p>So far it works, it might not be the best answer, but its an answer.</p>
  
  <p>Thank you all for your help!</p>