我的目标是将C ++代码连接到我的数据库并更新一些信息,以便我遵循许多文章,但没有一个能解决我的问题..
以下是问题......
代码i遵循以下链接: Here
这是我的控制台输出:
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
答案 0 :(得分:2)
这不是代码错误,只是你错误配置了Eclipse中的MySQL连接器。
您应该能够根据自己的需要调整本教程:
http://share-thevision.blogspot.com.es/2013/02/opencveclipse-on-windows.html
只关注如何链接OpenCV库,它与MySQL相同(但路径)