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..
Here is the Problem...
First I download the Boost,Mysql Server,C++ Connector and include in the eclipse but i think i did something Wrong because when i execute my Code such error is Shown check Screenshot:1 and Screenshot:2
Please Anyone Suggest me the Tutorial of Setup Eclipse C++
for the Code i followed the Below Link:
Here
Here is my Console output:
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
解决方案
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:
Just focus on how to link OpenCV libraries and it's the same (but paths) for MySQL