Hi,
please help me with error.
I want to run simple project below.
I have a lot of errors below and don't know how to fix it.
I use GCC port (Mingw)
#include "mysql/my_global.h"
#include "mysql/mysql.h"
#include <stdio.h>
int main(int argc, char **argv)
{
printf("MySQL client version: %s\n", mysql_get_client_info());
}
error
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "learn MySQL_wsp.mk""
----------Building project:[ basics - Debug ]----------
mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/stefano/Desktop/C++/learn MySQL'
gcc -c "C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/main.c" -g -DSTACK_DIRECTION=1 -o ./Debug/main.o "-I." "-I." "-I./mysql"
In file included from C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/mysql/my_global.h:76,
from C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/main.c:1:
./mysql/config-win.h:203:1: warning: "finite" redefined
./mysql/config-win.h:161:1: warning: this is the location of the previous definition
./mysql/config-win.h:245:1: warning: "STACK_DIRECTION" redefined
<command-line>: warning: this is the location of the previous definition
In file included from C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/mysql/my_global.h:415,
from C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/main.c:1:
c:\mingw-4.4.1\bin\../lib/gcc/mingw32/4.4.1/../../../../include/stdio.h:491: error: expected declaration specifiers or '...' before '(' token
c:\mingw-4.4.1\bin\../lib/gcc/mingw32/4.4.1/../../../../include/stdio.h:491: error: expected declaration specifiers or '...' before '(' token
In file included from C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/main.c:1:
C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/mysql/my_global.h:616:1: warning: "my_reinterpret_cast" redefined
In file included from C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/mysql/my_global.h:76,
from C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/main.c:1:
./mysql/config-win.h:307:1: warning: this is the location of the previous definition
In file included from C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/main.c:1:
C:/Documents and Settings/stefano/Desktop/C++/learn MySQL/mysql/my_global.h:1566: error: static declaration of 'rint' follows non-static declaration
mingw32-make.exe[1]: *** [Debug/main.o] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/stefano/Desktop/C++/learn MySQL'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
5 errors, 5 warnings