ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I found a copy of "The Xlib Programming Manual" to read online, and wanted to try and compile the "winman" window manager example, but it gives me errors, seemingly expecting other files. Could anyone help me about this?
I found a copy of "The Xlib Programming Manual" to read online, and wanted to try and compile the "winman" window manager example, but it gives me errors, seemingly expecting other files. Could anyone help me about this?
Probably, if you actually posted the errors, told us something about your environment, and what you did to GET the errors....
$ gcc -lX11 -o winman winman.c
winman.c:25:25: error: bitmaps/focus_frame_bi: No such file or directory
winman.c:28:24: error: eventnames.h: No such file or directory
winman.c: In function ‘main’:
winman.c:93: warning: incompatible implicit declaration of built-in function ‘exit’
winman.c:105: warning: incompatible implicit declaration of built-in function ‘exit’
winman.c:300: warning: incompatible implicit declaration of built-in function ‘exit’
winman.c:345: error: ‘event_names’ undeclared (first use in this function)
winman.c:345: error: (Each undeclared identifier is reported only once
winman.c:345: error: for each function it appears in.)
winman.c: In function ‘raise_lower’:
winman.c:420: warning: comparison between pointer and integer
winman.c: In function ‘iconify’:
winman.c:469: warning: comparison between pointer and integer
winman.c: In function ‘focus’:
winman.c:528: warning: comparison between pointer and integer
winman.c:536: warning: comparison between pointer and integer
winman.c: In function ‘draw_focus_frame’:
winman.c:584: error: ‘focus_frame_bi_bits’ undeclared (first use in this function)
winman.c:584: error: ‘focus_frame_bi_width’ undeclared (first use in this function)
winman.c:585: error: ‘focus_frame_bi_height’ undeclared (first use in this function)
winman.c: In function ‘move_resize’:
winman.c:650: warning: comparison between pointer and integer
You're missing development libraries and the "bitmaps/focus_frame_bi" files, as it says in the errors you got. You don't say what version/distro of Linux, but you should be able to find the eventnames.h file in one of the repos for your distro. The other stuff is probably part of that software package, where you got the code. Can't find it on any RPM site, and the only references I found through Google, reference that development kit.
Not much sense bumping the thread, when you don't say if you've installed the missing files or not. Either the files are missing, or the compiler can't find them, one of the two. So install the missing headers/files, or modify the search path/include them explicitly in the code.
And again, part of what you're missing is from that toolkit, where you got the source from. So even if you get the Linux headers sorted out, you're still missing parts.
I decided to manually clean up the code, but I can't figure out these errors:
Code:
$ gcc -lX11 winman.c
winman.c: In function ‘draw_focus_frame’:
winman.c:406: error: ‘focus_frame_bi_bits’ undeclared (first use in this function)
winman.c:406: error: (Each undeclared identifier is reported only once
winman.c:406: error: for each function it appears in.)
winman.c:406: error: ‘focus_frame_bi_width’ undeclared (first use in this function)
winman.c:406: error: ‘focus_frame_bi_height’ undeclared (first use in this function)
What are those focus_frame_bi_* variables?
My "cleaned-up" winman.c is attached. (I had to add .txt or the forum software didn't let it through)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.