0

In my application I have used a .so(shared object) file which is written using python c++ extension and compiled with g++ using the -c argument(to postpone the linking).

Now, I need to link two other .so files, which may be present in different folders on different machines, to the .so mentioned above(while running my application).

Any idea how I can link .so files during runtime?

Thanks in advance!

user2109788
  • 1,266
  • 2
  • 12
  • 29
  • From C, using `dlopen`, or from python (assuming it's an extension module) using `import`. Or, you could just set `LD_LIBRARY_PATH` appropriately and let the runtime linker do it for you. – Useless Aug 27 '15 at 10:31
  • @Useless Thanks for the response! The .so files to be linked are not extension modules. I tried setting the LD_LIBRARY_PATH but I got undefined symbol error. I added the directory(where shared objects are present) to LD_LIBRARY_PATH from the console. – user2109788 Aug 27 '15 at 10:49
  • Well that should work, so you need to figure out what symbol is missing, where it should come from and why it isn't found. That's another question though, and likely nothing to do with Python – Useless Aug 27 '15 at 10:52

0 Answers0