I want to make a connection to my database (MYSQL 5.5), but don't get the first step.
Code: Select all
#include <winsock2.h>
#include <mysql.h>
using namespace std;
MYSQL mysql;
int main()
{
mysql_init(&mysql);
return 0;
}
libmysql.lib
libmysqld.lib
mysqlclient.lib
mysqlservices.lib"
and add the include path from the MYSQL-directory.
While compiling, I get the (windows-)error:
"Id.exe funktioniert nicht mehr" (eng: "Id.exe has stopped working")
After the message, the compiler shows a lot of, mostly the same, errors:
.drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
.drectve `/DEFAULTLIB:"libcpmt" /DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
[Linker error] undefined reference to `@__security_check_cookie@4'
[Linker error] undefined reference to `_imp__connect@12'
[Linker error] undefined reference to `__security_cookie'
I use Windows 7 64bit and Dev-C++ (4.9.9.2) with Mingw/GCC 3.4.2 and run Dev-C++ as admin. Does anyone have the same error or have an idea, how to fix it?