At 21:20 +0000 11/14/04, premal mishra wrote:
I'm using MySQL version 4.0.20a on win98.
Compiler is Bloodshed Dev-C++ version 4.

My program compiles and links but gives a page fault error on running.
I'm linking the '\mysql\lib\opt\mysqlclient.lib' file.

Linker gives the warning >> ignoring duplicate section '.text'

CODE:
#include <config-win.h>
#include <mysql.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
MYSQL mysql;
MYSQL *connection;
connection= mysql_real_connect(&mysql, "localhost", "root", "premal", "test", 0, NULL, 0);


    return 0;
 }

You forgot to initialize your MYSQL struct.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to