开发者

Problem in linking X11 in Mac OS X

I use CodeBlocks in Mac to compile my source code:

#include <X11/Xlib.h>

Display *display;

int main()
{
  display = XOpenDisplay(NULL);
  XCloseDisplay(display);
  return 0;
}

Compiling the source code is 开发者_开发知识库successfull, but linking to X11 is not successfull. How to I solve this problem? Where is libX11 in Mac?

Thanks.


As Bavarious noted, you'll be looking in /usr/X11/lib (and OS X 10.6.8 uses a symlink to make /usr/X11R6 an option as well). I only used CodeBlocks once, so I couldn't tell you what it requires you do to pass

-L/usr/X11/lib

to gcc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜