g++ compilation error

From: Terrence Mak (stmak_at_se.cuhk.edu.hk)
Date: 12/30/04


Date: Thu, 30 Dec 2004 13:40:46 -0800

Hi,

I received these error messages when compiling a cpp program

modified-graphics.cpp: In function `struct jwin * j_make_window(int, int,
char *, char *, char *, int)':
modified-graphics.cpp:44: invalid use of undefined type `struct _XDisplay'
modified-graphics.cpp: In function `long unsigned int find_color_val(char *,
struct jwin *)':
modified-graphics.cpp:84: invalid use of undefined type `struct _XDisplay'

I have no idea what problem I have made. Can anyone help?

line 12>>jwin *j_make_window (int width, int height, char *color,
>> char *host, char *font, int expose)
>>{
>> ....

line 44>> win = XCreateWindow(disp, (disp->screens)->root,
>> 2, 2, width, height, 0,
>> CopyFromParent, InputOutput, CopyFromParent,
>> amask, &attr);
...

line 84 >> if (XAllocNamedColor(disp, (disp->screens)->cmap, name, &cell,
&exact) == 0)
>> cout << "\nFIND_COLOR_VAL: Could not allocate color \n" << name;

Many thanks,

Terrence



Relevant Pages

  • -lrmi and -lvbe dont work anymore!?
    ... gtf.h:46: warning: 'struct VesaCRTCInfoBlock' declared inside parameter list ... vo_vesa.c:184: error: invalid use of undefined type 'struct ... vo_vesa.c:582: error: dereferencing pointer to incomplete type ...
    (Debian-User)
  • [PATCH]a tar filesystem for 2.6.10-rc1-mm3
    ... +static int tarfs_readdir(struct file * filp, ... struct tarent *dir_tarent, *ent; ... +static int tarfs_readlink(struct dentry *dentry, char *buffer, int buflen) ...
    (Linux-Kernel)
  • [PATCH] a tar filesystem for 2.6.*(easily access tar file)
    ... +static int tarfs_readdir(struct file * filp, ... struct tarent *dir_tarent, *ent; ... +static int tarfs_readlink(struct dentry *dentry, char *buffer, int buflen) ...
    (Linux-Kernel)
  • [PATCH]a tar filesystem for 2.6.10-rc1-mm3
    ... +static int tarfs_readdir(struct file * filp, ... struct tarent *dir_tarent, *ent; ... +static int tarfs_readlink(struct dentry *dentry, char *buffer, int buflen) ...
    (Linux-Kernel)
  • [PATCH 6/14] score - New architecure port to SunplusCT S+CORE
    ... +struct sgttyb { ... char sg_ispeed; ... +static inline unsigned long get_PEVN ... * Checks if a pointer to a block of memory in user space is valid. ...
    (Linux-Kernel)