I have the following:
g++ $(LD_OPTS) -o lib/foo.so lib/bar.o lib/qaz.o ../path/to/foodependency.so
It and foo
are both being built here (assume foodependency has already been built by the makefile previously). The end result looks something like this, during build:
project
---libFoo
------lib
---------foo.so
---libFooDependency
------lib
---------foodependency.so
However, during runtime, both foo.so and foodependency.so are in the same directory, bar
:
bar
---foo.so
---foodependency.so
This layout during runtime cannot be changed. But now as a result, ldd foo.so
returns the following:
../path/to/foodependency.so => not found
How can I resolve this difference?