PDA

View Full Version : noob trying to learn C++: where is "/usr/X11R6/lib" ??



lethalfang
February 12th, 2009, 12:58 AM
I'm auditing a c++ programming course. The course is based on MS visual studio, but I want to do things in linux terminal, so I've a few extra things to figure out.

One program requires a Xwin library in /usr/X11R6/lib, as in:
g++ blah-blah-blah...... -L /usr/X11R6/lib -lX11

But /usr/X11R6/lib is nowhere to be found in ubuntu 8.10.

Where is that library?
If it's already in the system, where do I find it?

Thanks in advance!

AliTabuger7
February 12th, 2009, 01:52 AM
I'm guessing you need to install a dev package, but i don't know which one.

lensman3
February 12th, 2009, 03:12 AM
Find the file "libX11*". I think you could drop the /usr/X11... off the command line because the linker will find it in either /usr/lib or /usr/lib64 (for 64 bit systems). That library is the X11 link library and is already in use by the GUI on your system.

Sorivenul
February 12th, 2009, 03:25 AM
So you're trying to develop a program based on Xlib? AFAIK, you will need the "libx11-dev" package, available in the repositories.

lethalfang
February 12th, 2009, 05:56 AM
Thanks! You guys are right!
Those library files are now in /usr/lib, and since that's the ubuntu default, I can drop the "-L /usr/X11R6/lib" line.
:guitar: