Page 1 of 1

compiling against mysql.h

PostPosted: 12. November 2012 21:53
by jelkink
I install XAMPP on my Windows 7 system and am trying to compile code originally written in Linux. In my code I include mysql.h and in the makefile I include a reference to the include directory for xampp/mysql, but I keep running into the following error:

Code: Select all
In file included from C:/xampp/mysql/include/mysql.h:72:0:
C:/xampp/mysql/include/mysql_com.h:291:3: error: 'SOCKET' does not name a type
C:/xampp/mysql/include/mysql_com.h:470:16: error: 'SOCKET' was not declared in this scope
C:/xampp/mysql/include/mysql_com.h:470:29: error: expected primary-expression before 'const'
C:/xampp/mysql/include/mysql_com.h:470:58: error: expected primary-expression before 'unsigned'
C:/xampp/mysql/include/mysql_com.h:471:9: error: expected primary-expression before 'unsigned'


So it is missing references to, I think, sys/types.h and/or sys/socket.h, but these are, as far as I know, Linux-specific include files. So how is this normally handled under Windows - does anyone know?