c - X11/xlib.h giving me XClearWindow errors -


i have program written in c code. fork of hsetroot. took add lot more options 1 can manipulate image , colors set ones desktop. user has more control on it. compiled , installed no errors whatsoever.

i did on 32 bit debian linux os. went out , got me dual core 64 bit laptop ($50) install linux 64 bit. took program out dust off , maybe clean bit more, gp (general purpose).

when tried compile on command line getting errors , no longer compile. code has not been changed whatsoever. therefore no error should seen.

nevertheless getting error fails compile. funnier thing if use -m32 arg different fail compile error if use or not use -m46 arg.

i compile using command or without -m64 arg following error.

 gcc `imlib2-config --cflags` `imlib2-config --libs` mhsetroot-v1.6.2.c -o myapp 

then error

/usr/bin/ld: /tmp/cclrrrbo.o: undefined reference symbol 'xclearwindow' //usr/lib/x86_64-linux-gnu/libx11.so.6: error adding symbols: dso  missing command line collect2: error: ld returned 1 exit status 

it tells me xclearwindow not defined in header file when is. /usr/include/x11/xlib.h

extern int xclearwindow( display*        /* display */, window      /* w */ 

when compile using -m32 arg error instead

/development/c/mhsetroot$ gcc -m32  `imlib2-config --cflags` `imlib2- config --libs` mhsetroot-v1.6.2.c -o myapp 

i error

in file included mhsetroot-v1.6.2.c:29:0: /usr/include/x11/xlib.h:38:23: fatal error: sys/types.h: no such file or    directory #include <sys/types.h> 

telling wrong sys/types.h --

what gives -- code has never been changed when had no problems doing on 32 bit linux os. on 64 bit linux os having problems. real problem? because not code.

the command line arg needs added -lx11 tell link x11 ... (not needed when running 32 bit linux, needed in 64 bit linux n.i.w. (no idea why) gets rids of "dso missing command line" link error. compiles none of --


Popular posts from this blog