This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem Moving Shared Objects Linked With Absolute Paths


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]