Index: [thread] [date] [subject] [author]
  From: Garrett Mitchener <wgm2@acpub.duke.edu>
  To  : 
  Date: 02 Mar 1999 23:33:01 -0500

Re: lucky library linking

Matthew Todd <mt@perelandra.dorm.duke.edu> writes:


> suppose your directory with library files is stored in some
> variable called MY_LIBS.  be sure that LD_FLAGS includes both
> -L$(MY_LIBS) *and* -R$(MY_LIBS), as follows:
> 
> LD_FLAGS	= -L. -L$(MY_LIBS) -R$(LIB_DIR) -R$(MY_LIBS)
> 
> 

-R is a Solaris linker option that specifies a path string to stick in
the executable.  The operating system uses it to find libraries when
you run it.  The above should be fine.  If you have trouble, try
making a path string something like this:

RPATH = $(LIB_DIR):$(MY_LIBS)

LD_FLAGS = ... -R$(RPATH)

	-- Garrett :-)



Index: [thread] [date] [subject] [author]