What do I need to do to link with xlib?

后端 未结 5 1902
陌清茗
陌清茗 2021-02-05 05:15

I am using GCC, what switches do I need to add to link with Xlib? After searching, all I could find was -lX11, but that gave me ld: library not found for -lX1

5条回答
  •  余生分开走
    2021-02-05 05:29

    You also need -L/usr/X11/lib. It's not exactly Mac-specific, but you will find that the location of these libs will vary a bit from system to system.

提交回复
热议问题