Recently I have explore the use of mySQL with C/C++. I use Windows Dev-C++ w/ mingw version of GCC ad my compiler. I have been looking for a package that will allow me to, as the final result, backup all my mySQL databases. So I used the package manager to download mysql++. I have had no luck implementing it though.
It successfully installed (i.e. Dev-Cpp Package Manager didn't throw any errors), but when I tried some of the examples in the online documentation, they failed to compile. This is the example I tried.
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\Administrator\Desktop\mysql.cpp" -o "C:\Documents and Settings\Administrator\Desktop\mysql.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:1:18: util.h: No such file or directory
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:3:21: mysql++.h: No such file or directory
C:\Documents and Settings\Administrator\Desktop\mysql.cpp: In function `int main(int, char**)':
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:14: error: `mysqlpp' has not been declared
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:14: error: `Connection' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:14: error: (Each undeclared identifier is reported only once for each function it appears in.)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:14: error: expected `;' before "con"
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:15: error: `con' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:15: error: `connect_to_db' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:20: error: `mysqlpp' has not been declared
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:20: error: `Query' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:20: error: expected `;' before "query"
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:21: error: `query' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:22: error: `mysqlpp' has not been declared
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:22: error: `Result' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:22: error: expected `;' before "res"
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:26: error: `res' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:27: error: `mysqlpp' has not been declared
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:27: error: `Row' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:27: error: expected `;' before "row"
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:28: error: `mysqlpp' has not been declared
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:28: error: `size_type' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:28: error: expected `;' before "i"
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:29: error: `i' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\mysql.cpp:29: error: `row' undeclared (first use this function)
Execution terminated