LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Tags used in this thread
Popular LQ Tags

Reply
 
Thread Tools
Old 12-26-2008, 11:14 PM   #1
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Debian 4.0r0 'Etch', Ubuntu
Posts: 111
Thanked: 0
Unhappy Xwindows programming doesnt enable mouse functions


[Log in to get rid of this advertisement]
I am using Ubuntu 8.04. I was trying some Xwindows programming (trying to learn it). First, it went well. It created a window. It detected KeyPress event ant etc. But, when I tried to interface the mouse, I received some error.

In the event loop, I tried this code:
Code:
case Expose:
	ShowMousePosition(gc, win, MouseX, MouseY);
	break;

case MotionNotify:
	MouseX=event.xbutton.x;
	MouseY=event.xbutton.y;
	ShowMousePosition(gc, win, MouseX, MouseY);
	break;
When I complied the program, I got these errors:
Quote:
test.cpp: In function ‘int main()’:
test.cpp:66: error: ‘gc’ was not declared in this scope
test.cpp:66: error: ‘ShowMousePosition’ was not declared in this scope
I am following a text book. So, I wrote exactly the same codes the book has shown me.
What is the problem actually?
Is there any other packages I have to install?
matrix13 is offline  
Tag This Post
Reply With Quote

Reply

Bookmarks


Thread Tools

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
Xwindows programming in Ubuntu 7.04 matrix13 Linux - Software 2 03-15-2008 08:44 AM
Why doesnt my USB mouse doesnt work? barkha Linux - Hardware 2 08-16-2005 12:31 PM
C Programming: Help with Pointers to Functions devinWhalen Programming 2 03-04-2005 02:00 PM
Enable Scroll Lock in XWindows Demon10000 Linux - General 0 09-10-2003 01:15 PM
XWindows programming yaiba Linux - Software 2 06-16-2003 12:10 PM


All times are GMT -5. The time now is 11:02 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration