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

相关文章
|
6月前
|
Unix Linux Shell
syntax error: unexpected end of file
syntax error: unexpected end of file
33 0
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 : ‘}‘
117 0
|
6月前
|
开发工具
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
gdbusauth.c:1302:11: error: ‘%s’ directive argument is null
196 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
|
Linux
error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
103 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‘
139 0
error: ‘PRIO_PROCESS’ undeclared
error: ‘PRIO_PROCESS’ undeclared
96 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
error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]
error: passing ‘const AppJniCommand’ as ‘this’ argument discards qualifiers [-fpermissive]
99 0
|
C语言
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
147 0