This forum has been archived. Please start a new discussion on GitHub.

How to load plugins in sles10?


I have created an application which loads plugins. Those plugins reside inside the main executable it's directory.

On Windows I can load them no problem... But on sles10, I end up with the message "No such file or directory".

for example in the config I have: "Ice.Plugin.Db=mydb:create"

In the filesystem I have a ""

The (very weird) thing is that when I wrote a program:
int main()
  void * hdn = dlopen("/tmp/", RTLD_LAZY);

That "hdn" contains "NULL". And the dlerror() message says it cannot find the file. When I copy the .so 's to /usr/local/lib & run ldconfig everything works fine again... But that's not exactly what I want to do ;-)

So how could I make my program run with plugins in the local directory?

Thanks for any advise!


  • mes
    mes California

    dlopen looks for the shared library in the library search path. If the library is in your current directory, you should have "." in your LD_LIBRARY_PATH, such as


    Hope that helps,
    - Mark
  • That helped indeed ;).

    But ain't there a way to say inside the config to load "./" (for example if you detect a "/", then it won't construct a library name)?
  • mes
    mes California

    At present Ice's plugin loading mechanism doesn't support complete filenames; it assumes you're always using the "portable" syntax.

    Take care,
    - Mark