g ++に競合するtypedefを無視または回避させる方法はありますか?
バックグラウンド:
gridlab_dシミュレーター用のc++コードを書いています。モデルはc++データベースに接続する必要があるため、mysql++ライブラリを使用しています。mysql ++ライブラリを使用するには、mysqlライブラリにリンクする必要があるため、次のコマンドでコンパイルします。
g++ -I/usr/include/mysql -I/usr/local/include/mysql++
問題:
gridlab typedefのmysql.hとlist.hの両方が、名前LISTを持つ構造体です。これがコンパイラエラーです
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'
ご協力いただきありがとうございます!