I am beginning on MySQL, and I encountered the error message while compiling the code:
error LNK2001: unresolved external symbol _mysql_init@4
I have searched the web, and did everything that seems to be the problem.
#include <my_global.h>
#include <mysql.h>
#define NULL 0
int main() {
MYSQL * sql = mysql_init(NULL);
return 0;
}
I have checked that I have been using /MT option. Include, link directory added. I use release, and included "lib\opt".
libmysql.lib is in linker->input->additional dependency.
I have been using windows 7 x64 with VS2010 x86, and downloaded and installed MySQL Connector/C
Windows (x86, 64-bit), MSI Installer 6.0.2 (mysql-connector-c-6.0.2-winx64.msi)
What might be the problem, can anybody help?