0

我已经在 Mac 上安装了 X11:

当我在终端输入一些代码时:

./configure --with-x11

制作

之后,就会出现一些问题:

x.cc:37:22: error: X11/Xlib.h: No such file or directory
x.cc:38:23: error: X11/Xutil.h: No such file or directory
x.cc:39:21: error: X11/Xos.h: No such file or directory
x.cc:40:23: error: X11/Xatom.h: No such file or directory
x.cc:41:24: error: X11/keysym.h: No such file or directory
x.cc:42:35: error: X11/extensions/Xrandr.h: No such file or directory
x.cc:86: error: expected constructor, destructor, or type conversion before ‘*’ token
x.cc:88: error: expected initializer before ‘*’ token
x.cc:89: error: ‘Colormap’ does not name a type
x.cc:104: error: ‘Window’ does not name a type
x.cc:105: error: ‘GC’ does not name a type
x.cc:108: error: expected initializer before ‘*’ token
x.cc:136: error: ‘Pixmap’ does not name a type
x.cc:140: error: ‘Pixmap’ does not name a type
x.cc:146: error: ‘Pixmap’ does not name a type
x.cc:304: error: variable or field ‘xkeypress’ declared void
x.cc:304: error: ‘KeySym’ was not declared in this scope
x.cc:304: error: expected primary-expression before ‘int’
x.cc:326: error: ‘Colormap’ was not declared in this scope
x.cc:326: error: expected primary-expression before ‘n_tries’
x.cc:326: error: initializer expression list treated as compound expression
x.cc:326: error: expected ‘,’ or ‘;’ before ‘{’ token

你能告诉我如何解决这些问题吗?

4

1 回答 1

0
  1. 使用.conf.macosx代替configure;
  2. 打开conf.macosx并添加行:--with-x11;
  3. 跑:

    sh .conf.macosx
    
  4. 跑:

    make
    
于 2013-08-27T18:09:03.653 回答