Similar syntax causes strange, repeated compile errors when building PHP from source on Windows
I am trying to build PHP from source per these instructions. The configure works really well, but when I get to the nmake
part, things fall apart. I have no idea why I am getting errors about struct's, the lines referenced are functions!
I have put the problematic zend_interfaces.c here.
Zend\zend_interfaces.c(320) : error C2332: 'struct' : missing tag name
Zend\zend_interfaces.c(320) : error C2143: syntax error : missing ')' before 'type'
Zend\zend_interfaces.c(320) : error C2055: expected formal parameter list, not a type list
Zend\zend_interfaces.c(320) : error C2143: syntax error : missing ';' before ','
Zend\zend_interfaces.c(320) : error C2059: syntax error : ')'
Zend\zend_interfaces.c(343) : error C2332: 'struct' : missing tag name
Zend\zend_interfaces.c(343) : error C2143: syntax error : missing ')' before 'type'
Zend\zend_interfaces.c(343) : error C2055: expected formal parameter list, not a type list
Zend\zend_interfaces.c(343) : error C2143: syntax error : missing ';' before ','
Zend\zend_interfaces.c(343) : error C2059: syntax error : ')'
Zend\zend_interfaces.c(375) : error C2332: 'struct' : missing tag name
Zend\zen开发者_StackOverflow社区d_interfaces.c(375) : error C2143: syntax error : missing ')' before 'type'
Zend\zend_interfaces.c(375) : error C2055: expected formal parameter list, not a type list
Zend\zend_interfaces.c(375) : error C2143: syntax error : missing ';' before ','
Zend\zend_interfaces.c(375) : error C2059: syntax error : ')'
Zend\zend_interfaces.c(400) : error C2143: syntax error : missing ')' before 'type'
Zend\zend_interfaces.c(400) : error C2055: expected formal parameter list, not a type list
Zend\zend_interfaces.c(400) : error C2143: syntax error : missing ';' before ','
Zend\zend_interfaces.c(400) : error C2059: syntax error : ')'
Zend\zend_interfaces.c(490) : error C2332: 'struct' : missing tag name
Zend\zend_interfaces.c(490) : error C2143: syntax error : missing ')' before 'type'
Zend\zend_interfaces.c(490) : error C2055: expected formal parameter list, not a type list
Zend\zend_interfaces.c(490) : error C2143: syntax error : missing ';' before ','
Zend\zend_interfaces.c(490) : error C2059: syntax error : ')'
Are you sure that zend_class_entry
is defined as a variable type, maybe you aren't including a header or something?
I would expect that it would be because clearly PHP has been compiled for windows before.
I just deleted the first argument from the functions because they appeared to not be used.
Now everything works....
Strange....
edit: i just redownloaded the source
精彩评论