I'm trying to use C API to MySQL. MySQL Version: 4.0.20a Distribution Windows Binary Machine: P IV on intel 845GL board, 256 MB Ram, Win98se Compiler: Digital Mars C/C++ Compiler Version 8.40 (ftp://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm840c.zip) WHEN I COMPILE THE FOLLOWING CODE:
#include <sys/time.h> #include <mysql.h> int main() { return 0; } I GET FOLLOWING ERROR: c:\sc\bin\sc -Ic:\mysql\include -Nc -Ae -J -c test1.cpp my_socket fd; /* For Perl DBI/dbd */ ^ c:\mysql\include\mysql_com.h(116) : Error: ';' expected following declaration of struct member int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen, ^ c:\mysql\include\mysql_com.h(180) : Error: ')' expected to close function parameter list with } ^ c:\mysql\include\mysql_com.h(189) : Error: '=', ';' or ',' expected extern "C" { ^ c:\mysql\include\mysql_com.h(223) : Error: storage class is illegal in this context double my_rnd(struct rand_struct *); ^ c:\mysql\include\mysql_com.h(228) : Error: 'my_rnd' is not in function parameter list Fatal error: too many errors --- errorlevel 1 --- errorlevel 1 Regards Premal.