problems compiling mysqli (on win32)

php.internals

M. Sokolewicz

21 years ago
whenever I try compiling PHP, the mysqli extension gives me trouble. I've gotten this all from HEAD just a couple of hours ago (again, it didn't work before either). I'm using MSVC 7.1 (.NET). Here's the error I'm getting: ext\mysqli\php_mysqli.h(50) : error C2061: syntax error : identifier 'MYSQL_STMT' ext\mysqli\php_mysqli.h(54) : error C2059: syntax error : '}' ext\mysqli\php_mysqli.h(93) : error C2065: 'LOCAL_INFILE_ERROR_LEN' : undeclared identifier ext\mysqli\php_mysqli.h(93) : error C2057: expected constant expression ext\mysqli\php_mysqli.h(94) : error C2229: struct '__unnamed' has an illegal zero-sized array ext\mysqli\php_mysqli.h(127) : error C2143: syntax error : missing ')' before '*' ext\mysqli\php_mysqli.h(127) : error C2143: syntax error : missing '{' before '*' ext\mysqli\php_mysqli.h(127) : error C2059: syntax error : ')' Since I'm no good at C, I really have no idea what the problem here is... So, is this a problem with my compiler being stupid? or is this a real live problem in HEAD? hope somebody can help me with this, - M. Sokolewicz

Sebastian Bergmann

21 years ago
M. Sokolewicz wrote:
> So, is this a problem with my compiler being stupid?
Are you sure you have the right MySQL headers and libraries?
-- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69

M. Sokolewicz

21 years ago
Sebastian Bergmann wrote:
> M. Sokolewicz wrote: > >>So, is this a problem with my compiler being stupid? > > > Are you sure you have the right MySQL headers and libraries? >
ah, thanks for the headsup on this, it seems it was indeed a header/library mismatch; the configure script took em from the win32build dir instead of the mysql install (had to move the win32buikd ones to have it fetch the mysql install headers/libs instead) so, that works now; only problem left is an unresolved extrenal symbols problem. php5ts.dll.def : error LNK2001: unresolved external symbol _libiconv_version php5ts.dll.def : error LNK2001: unresolved external symbol libiconv php5ts.dll.def : error LNK2001: unresolved external symbol libiconv_close php5ts.dll.def : error LNK2001: unresolved external symbol libiconv_open php5ts.dll.def : error LNK2001: unresolved external symbol libiconv_set_relocati on_prefix Release_TS\php5ts.lib : fatal error LNK1120: 5 unresolved externals LINK : fatal error LNK1141: failure during build of exports file Now, I have no idea why this is hapenning, because according to the makefile, it links to them via PHP_DLL_DEF_SOURCES (which has the correct paths. I've tried changing them, and make failed earlier because it couldn't find them...). I can't figure out why it has to be so much more complicated on win32-systems; guess that's because few people actually try it there =/ - tul