Talk About Network

Google





Mac > Mac Programmer Help > Re: link X11 au...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 8 Topic 3787 of 3889
Post > Topic >>

Re: link X11 automatically

by Frank Swarbrick <fswarbrick@[EMAIL PROTECTED] > Jul 4, 2008 at 10:59 PM

Frank Swarbrick wrote:
> I was trying to compile (make) a program that uses X11.  Below is the 
> compile line followed by the error message:
> 
> gcc  hi.o s7_comp.a s7_data.a seed7_05.a -lX11 -lncurses -lm -o hi
> /usr/bin/ld: can't locate file for: -lX11
> 
> After some searching I found the location of libX11:
> /usr/X11R6/lib/libX11.dylib
> 
> So I made this change to the makefile:
> 
> LFLAGS = -L/usr/X11R6/lib
> 
> And now it works:
> gcc -L/usr/X11R6/lib hi.o s7_comp.a s7_data.a seed7_05.a -lX11 -lncurses

> -lm -o hi
> 
> So my question is, is there a way to have /usr/X11R6/lib added to the 
> standard ld lib search chain?  This program is built on Linux, which I 
> assume has X11 in the standard search chain.  (Perhaps a bad
assumption!)

I'm not sure if I didn't ask my question correctly, because I've found a 
different answer to my question.  Maybe it's so obvious?  Anyway, all I 
had to do is create an environment variable LIBRARY_PATH and place 
/usr/X11R6/lib in it.

Here it is in my .profile member:
LIBRARY_PATH=/opt/local/lib:/opt/local/lib/db46:/usr/X11R6/lib
ex****t LIBRARY_PATH

(The other two libraries are to pick up libs installed using Mac****ts.)

Anyway, that does everything I require.  Or seems to at least!  :-)

Frank
 




 8 Posts in Topic:
link X11 automatically
Frank Swarbrick <fswar  2008-06-28 23:49:55 
Re: link X11 automatically
Ben Artin <macdev@[EMA  2008-06-29 02:48:03 
Re: link X11 automatically
Frank Swarbrick <fswar  2008-06-29 21:07:05 
Re: link X11 automatically
Paul Floyd <root@[EMAI  2008-06-30 19:37:03 
Re: link X11 automatically
Frank Swarbrick <fswar  2008-07-04 22:59:21 
Re: link X11 automatically
Sherman Pendley <spamt  2008-07-05 02:08:37 
Re: link X11 automatically
Frank Swarbrick <fswar  2008-07-05 12:47:51 
Re: link X11 automatically
Sherman Pendley <spamt  2008-07-05 15:18:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 19:14:03 PST 2009.