error: expected declaration specifiers or ‘...’ before ‘FILE’

简介:


error: expected declaration specifiers or ‘...’ before ‘FILE’


In file included from /sever/php/php-5.3.6/ext/gd/libgd/gd_compat.c:8:
/usr/local/jpeg8//include/jpeglib.h:954: error: expected declaration specifiers or ‘...’ before

‘FILE’
/usr/local/jpeg8//include/jpeglib.h:955: error: expected declaration specifiers or ‘...’ before

‘FILE’

make: *** [ext/gd/libgd/gd_compat.lo] Error 1

 


这个问题应该是 库 文件路径问题


 1.安装gd之前,修改gd源码包目录下的gd_png.c

gd_png.c
进入该文件,找到#include "png.h"改成 #include "/usr/local/libpng/include/png.h"

【根据自己安装libpng的目录修改】

 

然后在 ./configure .......安装gd。

 

2.安装php之前,修改php源码包下的gd_compat.c

路径:【/php-5.3.6/ext/gd/libgd】

【根据自己安装libpng的目录修改】

include </usr/local/libpng/include/png.h>

然后再./configure .......安装php

本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/836892如需转载请自行联系原作者


yangzhimingg

相关文章
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
122 0
|
6月前
|
开发工具
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
211 0
|
6月前
|
Python
完美解决丨File “invalid.py“, line 1 print(`Hello World!`) ^ SyntaxError: invalid syntax
完美解决丨File “invalid.py“, line 1 print(`Hello World!`) ^ SyntaxError: invalid syntax
|
Java Go API
译|Don’t just check errors, handle them gracefully(二)
译|Don’t just check errors, handle them gracefully(二)
97 0
|
程序员 Go API
译|Don’t just check errors, handle them gracefully(一)
译|Don’t just check errors, handle them gracefully
81 0
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
140 0
error: ‘PRIO_PROCESS’ undeclared
error: ‘PRIO_PROCESS’ undeclared
96 0
error: possibly undefined macro: LT_SYS_SYMBOL_USCORE please use m4_pattern_allow
error: possibly undefined macro: LT_SYS_SYMBOL_USCORE please use m4_pattern_allow
145 0
error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]
error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]
99 0
error: implicit declaration of function ‘RAND_egd’ [-Werror=implicit-function-declaration]
error: implicit declaration of function ‘RAND_egd’ [-Werror=implicit-function-declaration]
127 0