LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-07-2009, 08:21 PM   #1
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
compile winman


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?
 
Old 12-07-2009, 08:50 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by MTK358 View Post
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....
 
Old 12-08-2009, 06:48 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I copied and pasted the code here to "winman.c":

http://www.softintegration.com/chhtm...an/winman.html

And:

Code:
$ 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
 
Old 12-08-2009, 11:26 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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.
 
Old 12-08-2009, 12:30 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by TB0ne View Post
You don't say what version/distro of Linux
It says right under my username!
 
Old 12-08-2009, 05:20 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by MTK358 View Post
It says right under my username!
And it lists several under mine...we don't know what box you're using at the time, and what OS it has on it.
 
Old 12-08-2009, 05:30 PM   #7
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
location of the X header files maybe?

e.g. perhaps
Code:
gcc -I/usr/local/include -lX11 -o winman winman.c
 
Old 12-08-2009, 07:28 PM   #8
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I compile other X11 programs just using "-lX11" and it works.
 
Old 12-09-2009, 12:49 PM   #9
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
BUMP
 
Old 12-09-2009, 02:34 PM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by MTK358 View Post
BUMP
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.
 
Old 12-09-2009, 02:50 PM   #11
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
What I posted seems to be the only part of winman that I can find on the internet. I'll see if I can find any tutorials/instructions about this.
 
Old 12-09-2009, 03:33 PM   #12
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443

Original Poster
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
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)

Last edited by MTK358; 03-26-2010 at 04:17 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Compile kernel] How to compile/install the modules ? frenchn00b Linux - General 1 09-06-2009 03:18 PM
Trying to patch kernel + compile, compile is looping. kripz Linux - Kernel 1 06-16-2009 06:51 AM
CLFS 5.9 - Glibc compile: suffix of object files, cannot compile Noddegamra Linux From Scratch 3 04-27-2009 12:49 AM
how to compile software for any other Linux box which is do not have compile? hocheetiong Linux - Newbie 4 03-06-2009 04:35 PM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration