How to access a custom shared lib on Linux?

How to access a custom shared lib on Linux?

Anonymous
Not applicable
521 Views
0 Replies
Message 1 of 1

How to access a custom shared lib on Linux?

Anonymous
Not applicable

Our plug-in needs to access some custom shared libraries, which we provide in our installer. The Maya developer docs say:

 

If a C++ plug-in links to a custom shared library, special steps must be taken.

  • Windows: The shared library (ending in .dll) must go into either Maya's own bin directory or one of the directories in the user's PATH environment variable.
  • Linux: The library (ending in .so) must go into either Maya's own lib directory or one of the directories in the user's LD_LIBRARY_PATH environment variable.

I'd like to avoid cluttering up Maya's directory tree if at all possible, but I don't want the user to have to fiddle with their LD_LIBRARY_PATH envariable either.

 

For a Windows plug-in a module-specific folder can be added to PATH using the following syntax in the module file:

 

    PATH+:=lib

 

and that works, allowing us to keep the custom DLLs in the 'lib' sub-directory of the folder containing our module. But if I try the same thing on Linux:

 

    LD_LIBRARY_PATH+:=lib

 

it doesn't work.

 

Does anyone have a workaround for this? Or are we stuck putting the shared libs into Maya's tree?

0 Likes
522 Views
0 Replies
Replies (0)