error: png.h: No such file or directory

简介:

 

error: png.h: No such file or directory

编译gd-2.0.35.tar.gz时报错:
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/freetype/include/freetype2 -
I/usr/local/freetype/include -I/usr/local/freetype/include -
I/usr/local/jpeg/include -g -O2 -MT gd_png.lo -MD -MP -MF .deps/gd_png.Tpo -c 
gd_png.c -fPIC -DPIC -o .libs/gd_png.o
gd_png.c:16:53: error: png.h: No such file or directory
gd_png.c:47: error: expected specifier-qualifier-list before ‘jmp_buf’
gd_png.c:54: error: expected ‘)’ before ‘png_ptr’
gd_png.c:82: error: expected ‘)’ before ‘png_ptr’
gd_png.c:92: error: expected ‘)’ before ‘png_ptr’


解决办法:

vi gd_png.c

#include “png.h”             
替换成:
#include “/usr/local/libpng/include/png.h”  
           
然后再make就可以了

注:include“”双引号里包含的是libpng安装的路径里的include文件夹里

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


yangzhimingg

相关文章
|
5月前
|
Android开发
error: GLES2/gl2.h: No such file or directory
error: GLES2/gl2.h: No such file or directory
|
6月前
|
Shell
adb: error: cannot create file/directory ‘d:/1.png‘: No such file or directory
adb: error: cannot create file/directory ‘d:/1.png‘: No such file or directory
106 0
|
6月前
|
Java
cannot open shared object file: No such file or directory
cannot open shared object file: No such file or directory
88 0
|
Python
ERROR: file or directory not found: xx.py
​ 1、问题出现原因 在vscode中已导入pytest框架,做自动化demo小测试,运行Python文件一直出现如题错误,截图如下: ERROR: file or directory not found: xx.py  2、解决办法 1)直接把该文件移到当前主目录下,放在PYTHON-STUDY下 2)VSCode中右键tuopan.py文件,选择[在集成终端中打开],或者通过CD命令进入到tuopan.py文件所在目录 然后输入以下命令即可: 注:上述命令不是换行,在d:/前有空格 ,第一行信息为python所在安装路径,空格后的换行为运行的python文件的所在路径  
161 0
ftok info: No such file or directory
ftok info: No such file or directory
199 0
fatal error C1083: 无法打开包括文件:“fenv.h”: No such file or directory
fatal error C1083: 无法打开包括文件:“fenv.h”: No such file or directory
183 0
objdump: ‘1443.14.0)‘: No such file or directory
objdump: ‘1443.14.0)‘: No such file or directory
108 0
Cannot open include file: 'unistd.h': No such file or directory的解决办法
Cannot open include file: 'unistd.h': No such file or directory的解决办法
380 0
No such file or directory
No such file or directory
319 0
No such file or directory
FILE
FILE
117 0