当我看到这里显示的错误时,我试图编译Esetroot或make for Esetroot。是否有某种命令行参数必须添加才能生成,头文件已经添加到c文件中,所以我不确定它在X11中丢失了哪些头文件。我的X11-发展,和imlib2-发展是安装的。
谢谢
%userx@voided Esetroot-20030422>$make
cc -L/usr/lib -lImlib2 -DPIXMAP_SUPPORT -DHAVE_UNISTD_H -o Esetroot Esetroot.c
/usr/bin/ld: /tmp/ccug0Ak3.o: undefined reference to symbol 'XSetFillStyle'
/lib64/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:15: recipe for target 'Esetroot' failed
make: *** [Esetroot] Error 1
C文件中的头文件。
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/Xos.h>
#include <Imlib2.h>
发布于 2016-01-19 21:56:36
XSetFillStyle
函数驻留在X11库中(也称为"Xlib")。
您的示例没有显示您使用了X11库,例如,添加一个-lX11
会有帮助。(有些配置需要额外的库):
cc -DPIXMAP_SUPPORT -DHAVE_UNISTD_H -o Esetroot Esetroot.c -lImlib2 -lX11
https://unix.stackexchange.com/questions/256329
复制相似问题