title: Avoiding conflicting declaration errors in typedef c++
body: <p>Is there a way I can make g++ ignore or work around conflicting typedefs?</p>
  
  <p><strong>Background:</strong></p>
  
  <p>I'm writing some c++ code for the gridlab_d simulator. My model needs to connect to a c++ database, so I'm using the mysql++ library. use of the mysql++ library requires me to link to the mysql library, so i compile with </p>
  
  <p><code>g++ -I/usr/include/mysql -I/usr/local/include/mysql++</code></p>
  
  <p><strong>Problem:</strong></p>
  
  <p>both mysql.h and list.h in gridlab typedef a struct to have the name LIST . Here is the compiler error</p>
  
  <pre><code>In file included from /usr/include/mysql/mysql.h:76, 
               from /usr/include/mysql++/common.h:182,
               from /usr/include/mysql++/connection.h:38,
               from /usr/include/mysql++/mysql++.h:56,
               from direct_data.cpp:21:
  /usr/include/mysql/my_list.h: At global scope:
  /usr/include/mysql/my_list.h:26: error: conflicting declaration 'typedef struct st_list LIST'
  ../core/list.h:22: error: 'LIST' has a previous declaration as 'typedef struct s_list LIST'
  </code></pre>
  
  <p>Thanks for your help!</p>