Hi,
I am trying to compile following, very simple C code to connect mysql database:
#include <stdio.h>
#include <my_global.h>
#include <mysql.h>
int main(int argc, char **argv)
{
printf("MySQL client version: %s\n", mysql_get_client_info());
}
I am compiling it like:
C:\Dev-Cpp\bin>gcc -o test.exe -I"C:\Program Files\MySQL\MySQL Server 5.5\include\mysql" -L"C:\Program Files\MySQL\MySQL Server 5.5\lib\mysqld.dll" C:\Dev-Cpp\omat\1801\mwsql.c
and i get an error:
undefined reference to `mysql_get_client_info
Can someone help me on what is the correct syntax to compile this?
kole