Problem Moving Shared Objects Linked With Absolute Paths

David.St-Onge@sail-labs.de David.St-Onge@sail-labs.de
Thu Jan 11 02:30:00 GMT 2001


Hi everybody!

I've got a problem with moving shared objects linked with an absolute path.

I'm compiling with g++ on SuSE Linux 6.4.

My makefile looks like this:

     SOBJS = \
          $(BINARY)/aaa.so \
          $(BINARY)/bbb.so \
          $(BINARY)/ccc.so

     $(BINARY)/run.exe: run.o $(SOBJS)
          g++ run.o $(SOBJS) -o $(BINARY)/run.exe ?ldl

     ?

After compiling, if I move my shared objects from $(BINARY) to another
directory, run.exe fails to execute because it cannot find its shared
object in $(BINARY) anymore.  Even if the shared objects are located in the
same directory as run.exe and this directory is included in
LD_LIBRARY_PATH, run.exe fails to execute if the shared objects aren't left
in $(BINARY).

How can I solve this problem???

Thanks a lot for your help!

David St-Onge




More information about the Gcc mailing list