在 Windows 上从源代码构建 PHP 时,类似的语法会导致奇怪的重复编译错误
我正在尝试按照 这些 说明从源代码构建 PHP。配置工作得很好,但是当我到达 nmake 部分时,事情就崩溃了。我不知道为什么我会收到有关结构的错误,引用的行是函数!
我已将有问题的 zend_interfaces.c 放在这里。
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 : ')'
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 : ')'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您确定 zend_class_entry 被定义为变量类型,也许您没有包含标头或其他内容?
我预计这是因为 PHP 之前显然是为 Windows 编译的。
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