Author Topic: bass plugin load on Linux  (Read 374 times)

ingof

  • Posts: 6
bass plugin load on Linux
« on: 21 Apr '19 - 22:03 »
Hello,
I hope to get some help here about loading Plugins on Linux.

I use as sample:
Code: [Select]
HPLUGIN temp = _BASS_PluginLoad(_T("ibbassopus.so"),  BASS_UNICODE);I tried also with very much different combinations like
Code: [Select]
HPLUGIN temp = _BASS_PluginLoad("ibbassopus.so", 0);And so forth.
In all cases I get the error code 2, meaning that bass lib cannot load the plugin. But all other functions from Basslib are working great in my app.

So In header file there is
Code: [Select]
HPLUGIN BASSDEF(BASS_PluginLoad)(const char *file, DWORD flags);In help file
Code: [Select]
HPLUGIN BASSDEF(BASS_PluginLoad)(char *file, DWORD flags);Maybe this is a issue?

I only have this problems on Linux. On Mac and Windows everything works well.
Plugin is inside the same directory as the libbass.
My app is compiled with C11, Unicode. 64 bit System and 64bit basslibs / Plugins are used.

Anyone has an idea?
« Last Edit: 21 Apr '19 - 22:22 by ingof »

Ian @ un4seen

  • Administrator
  • Posts: 22121
Re: bass plugin load on Linux
« Reply #1 on: 22 Apr '19 - 17:05 »
I guess it's a typo but just to be sure, there's a "l" missing from the filenames in your BASS_PluginLoad calls above, ie. it should be "libbassopus.so". If that isn't the issue, what character set is your programming language/compiler using? UTF-8 filenames are used by default on Linux so it isn't usually necesarry to use the BASS_UNICODE flag (for UTF-16) there.

If you're loading the BASS library dynamically (it looks like you may be), you should do so with the RTLD_GLOBAL flag set, so that the add-ons can see the BASS functions.

If the probem persists, please see if you can reproduce it with the PLUGINS example that's included in the BASS package.

ingof

  • Posts: 6
Re: bass plugin load on Linux
« Reply #2 on: 22 Apr '19 - 23:10 »
Hi Ian,

many thanks for your hint. It was the missing RTLD_GLOBAL flag.