急求高手帮忙---编译CImg.h文件时老是出错

OOo,TeX,KO,ABI,GIMP,Picasa,ProE,QCAD,Inkscape,Kicad,Eagle
回复
zzzchong
帖子: 1
注册时间: 2009-10-17 13:07

急求高手帮忙---编译CImg.h文件时老是出错

#1

帖子 zzzchong » 2009-10-17 13:15

最近用到CImg.h文件。我从网上下载了一个CImg.h.可当我用g++编译时老是出现一堆错误。我用的是UBANTU9.0.4。错误的类型如下:
CImg.h:7792: 错误: ‘Window’没有命名一个类型
CImg.h:7793: 错误: ‘Colormap’没有命名一个类型
CImg.h:7794: 错误: ISO C++ 不允许声明无类型的‘XImage’
CImg.h:7794: 错误: expected ‘;’ before ‘*’ token
CImg.h:7853: 错误: expected ‘,’ or ‘...’ before ‘*’ token
CImg.h:7853: 错误: ISO C++ 不允许声明无类型的‘XEvent’
CImg.h:7977: 错误: ‘Colormap’未声明
CImg.h:8206: 错误: ‘Display’未声明
CImg.h:8206: 错误: ‘XErrorEvent’未声明
CImg.h: In static member function ‘static int cimg_library::CImgDisplay::screen_dimx()’:
CImg.h:7802: 错误: ‘struct cimg_library::cimg::X11info’没有名为‘display’的成员
CImg.h:7803: 错误: ‘Display’在此作用域中尚未声明
CImg.h:7803: 错误: ‘disp’在此作用域中尚未声明
CImg.h:7803: 错误: ‘XOpenDisplay’在此作用域中尚未声明
CImg.h:7805: 错误: ‘DefaultScreen’在此作用域中尚未声明
CImg.h:7805: 错误: ‘DisplayWidth’在此作用域中尚未声明
CImg.h:7806: 错误: ‘XCloseDisplay’在此作用域中尚未声明
下面还有很长,没有一一列举。
望广大高手给与帮助。谢谢!
回复