views:

303

answers:

2

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\zend_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 : ')'
+1  A: 

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.

Uberlemurguy
that makes sense but how would I tell if it is being defined?
Ramblingwood
Try setting the compiler flags such that it runs the preprocessor, but doesn't compile the preprocessed files. Then you can poke through and see exactly what the compiler is looking at.
Anon.
+1  A: 

I just deleted the first argument from the functions because they appeared to not be used.

Now everything works....

Strange....

Ramblingwood
Deleting arguments from functions is usually pretty bad idea. Check that your include paths (/I) are OK in the makefile.
StasM
Yes it is. As a follow up, I redownloaded the source code and everything works the first time around, no deleting necessary.
Ramblingwood