###前提・実現したいこと
C++でMySQLに接続したいと思い公式のサンプルコートを実行しようとしていました。
しかし、
undefined reference to `__imp__ZN3sql5mysql19get_driver_instanceEv'というエラーが発生してしまいビルドできません。未定義への参照とのことですが何が悪いのでしょう?
###発生している問題・エラーメッセージ
エラーメッセージ undefined reference to `__imp__ZN3sql5mysql19get_driver_instanceEv' 未定義への参照
###該当のソースコード
#include <driver/mysql_driver.h> #include <driver/mysql_connection.h> #include <driver/mysql_error.h> #include <cppconn/Statement.h> #include <cppconn/ResultSet.h> using namespace std; int main() { sql::mysql::MySQL_Driver *driver; //エラー発生 driver = sql::mysql::get_mysql_driver_instance(); return 0; }
###試したこと
静的ライブラリのパスを見直していますがうまくいっていません。
###補足情報(言語/FW/ツール等のバージョンなど)
eclipse 4.4
Connector/C++ 1.19
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/07/31 08:20
2017/07/31 08:21
2017/07/31 09:01
2017/07/31 10:34
2017/07/31 10:51
2017/07/31 10:51
2017/07/31 11:03
2017/07/31 11:31
2017/07/31 11:34
2017/07/31 11:35
2017/07/31 11:38
2017/07/31 11:39
2017/07/31 11:41
2017/07/31 11:42
2017/07/31 12:16
2017/07/31 16:33
2017/08/07 04:07