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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
09-01-2009, 10:14 AM
|
#1
|
LQ Newbie
Registered: Nov 2008
Location: bhilwara(Rajasthan),India
Distribution: ubuntu
Posts: 5
Rep:
|
how to use g++ to compile x11 programs
hi,
i have started a small project on pay roll management system.
so i am using 'X window system' for GUI with c++ coding.When i compile using g++ i got errors related to x11.i have included various x11 headers in my code like xlib.h ,xutil.h etc.i am using Ubuntu 8.10.
i have to use x11 without any toolkit and must do in c++.So PLEASE help me.
Thanks in advance.
|
|
|
09-01-2009, 10:33 AM
|
#2
|
Senior Member
Registered: May 2005
Posts: 4,481
|
Quote:
Originally Posted by vipul jain
hi,
i have started a small project on pay roll management system.
so i am using 'X window system' for GUI with c++ coding.When i compile using g++ i got errors related to x11.i have included various x11 headers in my code like xlib.h ,xutil.h etc.i am using Ubuntu 8.10.
i have to use x11 without any toolkit and must do in c++.So PLEASE help me.
Thanks in advance.
|
I guess most of us here do not possess telepathic abilities and thus can't:
- see your source code;
- see compiler error messages.
|
|
|
09-01-2009, 12:48 PM
|
#3
|
Member
Registered: Jul 2003
Posts: 659
Rep:
|
You probably need to link the x11 libraries .. -lX11 etc, and also point gcc to the right location of the headers... with -I/path/to/X-headers
If the libraries are in non-standard location, pass the location of the libraries with -L/path/to/libs
Oh and install the x development packages (i.e., the -devel packages in your distribution mostly)
|
|
|
09-02-2009, 02:54 AM
|
#4
|
Member
Registered: May 2004
Location: Italy
Distribution: Ubuntu, Gentoo
Posts: 57
Rep:
|
you may also want to take a look at pkg-config ( http://pkg-config.freedesktop.org/wiki/) which is a very valuable tools when working with other libraries (and also when libraries and headers are not installed in a standard location).
|
|
|
09-02-2009, 04:15 AM
|
#5
|
Member
Registered: Dec 2007
Location: Fălticeni, Romania
Distribution: Debian;Fedora
Posts: 77
Rep:
|
video tutorial compile C on X11
On http://tv.free-tutorials.org you see video tutorial with name:
"Compile OpenGl with gcc on linux" maybe use this.
|
|
|
All times are GMT -5. The time now is 06:48 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|