Advertisement

-lx11

Started by May 21, 2000 05:56 AM
3 comments, last by harry 24 years, 4 months ago
Hi, I am trying to compile (my first) Xlib program with g++ using the header file Xlib.h etc. When compiling I have to (?) use the linking switch -lx11. The compiler doesn't like this....says it can NOT find the library or some such thing. Can someone help? Should I be using the -L switch? I have installed the complete RedHat 6.0 package incluing the X Development stuff. Thanks Harry Edited by - harry on 5/21/00 5:46:01 PM
I''d have to double check when I''m on a Linux box, but off the top of my head, I''m pretty sure you need to do -lX11 instead of -lx11. (Capitalization counts.)
Advertisement
Doesn''t work with a capital X either... (-lX11).

Upgradeed to RedHat 6.2 yesterday and made sure that
I included the X Development libraries...
try using

-L/usr/X11R6/lib

on the gcc command line.

If that doesn''t work, use locate to find libx11.(a/so)

After careful deliberation, I have come to the conclusion that Nazrix is not cool. I am sorry for any inconvienience my previous mistake may have caused. We now return you to the original programming

Try using gcc first, since Xlib is not a C++ required
library.

gcc myprog.c -o myprog -lX11 -L/usr/X11R6/lib
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.

This topic is closed to new replies.

Advertisement