Hello, I tried to code a (very) small program under windows, this is my first with C mysql functions :
#include <stdio.h> #include <mysql.h> int main(void) { MYSQL *mysrv = NULL; mysrv = mysql_init(mystruct); if ( mysrv == NULL ) { perror("Struct initialize failed\n"); exit (-1); } mysql_close(mystruct); return (0); } I compiled this with Dev-C++ v 4.9.8.0 after being configure the header files path. It give me a lot of errors, and i don't know why. Any help would be very great! Compiler: Default compiler Executing gcc.exe... gcc.exe "U:\console\toto.c" -o "U:\console\toto.exe" -I"C:\Dev-Cpp\include" -I"c:\mysql\include" -L"C:\Dev-Cpp\lib" In file included from c:/mysql/include/mysql.h:57, from U:/console/toto.c:2: c:/mysql/include/mysql_com.h:116: parse error before "SOCKET" c:/mysql/include/mysql_com.h:116: warning: no semicolon at end of struct or union c:/mysql/include/mysql_com.h:135: parse error before '}' token c:/mysql/include/mysql_com.h:135: warning: data definition has no type or storage class c:/mysql/include/mysql_com.h:167: parse error before '*' token [...] c:/mysql/include/mysql_com.h:180: parse error before "s" In file included from U:/mep/Dev/console/toto.c:2: c:/mysql/include/mysql.h:165: parse error before "NET" c:/mysql/include/mysql.h:165: warning: no semicolon at end of struct or union c:/mysql/include/mysql.h:202: parse error before '}' token c:/mysql/include/mysql.h:202: warning: data definition has no type or storage class c:/mysql/include/mysql.h:211: parse error before "MYSQL" c:/mysql/include/mysql.h:211: warning: no semicolon at end of struct or union c:/mysql/include/mysql.h:217: parse error before '}' token c:/mysql/include/mysql.h:217: warning: data definition has no type or storage class c:/mysql/include/mysql.h:232: parse error before "NET" c:/mysql/include/mysql.h:232: warning: no semicolon at end of struct or union c:/mysql/include/mysql.h:238: conflicting types for `last_errno' c:/mysql/include/mysql_com.h:118: previous declaration of `last_errno' c:/mysql/include/mysql.h:241: conflicting types for `last_error' c:/mysql/include/mysql_com.h:121: previous declaration of `last_error' c:/mysql/include/mysql.h:242: parse error before '}' token c:/mysql/include/mysql.h:242: warning: data definition has no type or storage class c:/mysql/include/mysql.h:266: parse error before '*' token [...] U:/console/toto.c: In function `main': U:/console/toto.c:7: `mysrv' undeclared (first use in this function) U:/console/toto.c:7: (Each undeclared identifier is reported only once U:/console/toto.c:7: for each function it appears in.) Execution terminated -- Vincent -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]