无法在Eclipse中使用C ++连接MySQL数据库 [英] Unable to Connect mySQL database using C++in Eclipse
本文介绍了无法在Eclipse中使用C ++连接MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的目标是将C ++代码连接到我的数据库,并更新一些信息,所以我遵循许多文章,但没有解决我的问题..
My Aim is to connect the C++ code to my database and update some information so i follow many Articles but none is solve my Problem..
是问题...
- 首先我下载Boost,Mysql服务器,C ++连接器,因为我执行我的代码这样的错误是Shown检查屏幕截图:1和截图:2
- 请任何人建议我的教程安装Eclipse C ++
这是我的控制台输出:
12:14:54 **** Incremental Build of configuration Debug for project C++_dev ****
Info: Internal Builder is used for build
g++ "-IC:\\Program Files\\MySQL\\Connector.C++ 1.1\\include" "-IC:\\Program Files\\MySQL\\MySQL Server 5.7\\include" "-IC:\\Software\\boost_1_61_0" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\C++_dev.o" "..\\src\\C++_dev.cpp"
In file included from C:\Program Files\MySQL\Connector.C++ 1.1\include/cppconn/connection.h:33:0,
from C:\Program Files\MySQL\Connector.C++ 1.1\include/mysql_connection.h:30,
from ..\src\C++_dev.cpp:14:
C:\Program Files\MySQL\Connector.C++ 1.1\include/cppconn/warning.h:40:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning (disable : 4290)
^
In file included from C:\Program Files\MySQL\Connector.C++ 1.1\include/cppconn/variant.h:38:0,
from C:\Program Files\MySQL\Connector.C++ 1.1\include/cppconn/connection.h:35,
from C:\Program Files\MySQL\Connector.C++ 1.1\include/mysql_connection.h:30,
from ..\src\C++_dev.cpp:14:
C:\Program Files\MySQL\Connector.C++ 1.1\include/cppconn/exception.h:48:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning (disable : 4290)
^
C:\Program Files\MySQL\Connector.C++ 1.1\include/cppconn/exception.h:52:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning(push)
^
C:\Program Files\MySQL\Connector.C++ 1.1\include/cppconn/exception.h:53:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning(disable: 4275)
^
C:\Program Files\MySQL\Connector.C++ 1.1\include/cppconn/exception.h:58:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning(pop)
^
g++ "-LC:\\Program Files\\MySQL\\Connector.C++ 1.1\\lib\\opt" "-LC:\\Program Files\\MySQL\\MySQL Server 5.7\\lib" -o C++_dev.exe "src\\C++_dev.o" "-lC:\\Program" "Files\\MySQL\\MySQL" Server "5.7\\lib\\mysqlclient.lib"
g++: error: Files\MySQL\MySQL: No such file or directory
g++: error: Server: No such file or directory
g++: error: 5.7\lib\mysqlclient.lib: No such file or directory
推荐答案
这不是代码错误,只是你错误配置MySQL连接器在Eclipse
It's not a code error, it's just that you misconfigured the MySQL connector in Eclipse.
您应该能够根据需要修改本教程:
You should be able to adapt this tutorial to your needs:
http://share-thevision.blogspot.com.es/2013/02/opencveclipse- on-windows.html
只关注如何链接OpenCV库,它与MySQL一样(但路径)
Just focus on how to link OpenCV libraries and it's the same (but paths) for MySQL
这篇关于无法在Eclipse中使用C ++连接MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文