MySQL, C++, Windows XP: mysql_init() throws an exception
Posted by: Slav Blinnikov
Date: December 24, 2010 06:17PM

The code:


#include <my_global.h>
#include <mysql.h>

#include <cstdio>

int main(int argc, char** argv)
{
MYSQL* mysql = mysql_init(NULL);

getchar();

mysql_close(mysql);

return 0;
}

P.S. Visual Studio 2010 Express Project's definitions: WIN32, _DEBUG, _CONSOLE

throws an exception "Access violation reading location 0x0...04" during the call to "mysql_init(NULL)". I cannot figure out a possible reason of it - I don't even connect to any server yet - it just the initialization.

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL, C++, Windows XP: mysql_init() throws an exception
1249
December 24, 2010 06:17PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.