Fl_Plugin question

15 views
Skip to first unread message

Paul Hahn

unread,
Oct 23, 2025, 9:06:16 AMOct 23
to fltk.general
Are Fl_PluginManager::load() and loadAll() cumulative in regards to plugins when called on different files / directories?

Matthias Melcher

unread,
Oct 23, 2025, 12:57:44 PMOct 23
to fltk.general

LoadAll calls LoadLibrary() on all DLL style files in the given directory. It does nothing „smart“ (if I remember correctly) or ke checking and avoiding loading the same DLL twice. But you can call the function multiple times for different directories, and all plugins from all directories will be loaded.

 It‘s been forever that I wrote this. It was meant to go into Fluid for testing, but was never put in there.

Paul Hahn

unread,
Oct 23, 2025, 5:54:35 PMOct 23
to fltk.general
On Thursday, October 23, 2025 at 11:57:44 AM UTC-5 Matthias Melcher wrote:

LoadAll calls LoadLibrary() on all DLL style files in the given directory. It does nothing „smart“ (if I remember correctly) or ke checking and avoiding loading the same DLL twice. But you can call the function multiple times for different directories, and all plugins from all directories will be loaded.

 It‘s been forever that I wrote this. It was meant to go into Fluid for testing, but was never put in there.

OK, thanks. That sounds like it should act in a cumulative way, even if not smart about avoiding duplications. 

FYI I have just recently tested using latest (1.5) Fl_Plugin + Fl_PluginManager in a minimal fashion (not the way I asked about) on my Linux Mint machine, and it seems to work fine. Since it should help me avoid having to write my own dlopen()/dlsym() -based code, I plan to use it in my application. Please do not let it ever become orphaned code!

Matthias Melcher

unread,
Oct 24, 2025, 12:00:57 PM (14 days ago) Oct 24
to fltk.general
pauldou...@gmail.com schrieb am Donnerstag, 23. Oktober 2025 um 23:54:35 UTC+2:
FYI I have just recently tested using latest (1.5) Fl_Plugin + Fl_PluginManager in a minimal fashion (not the way I asked about) on my Linux Mint machine, and it seems to work fine. Since it should help me avoid having to write my own dlopen()/dlsym() -based code, I plan to use it in my application.

It's mostly that, a wrapper for OpenLibrary/dlopen.
 
Please do not let it ever become orphaned code!

LOL. We are maintaining FLTK now for - um -  30+ years, still fixing bugs, adapting to new APIs and even adding features. Now *that* is LTS ;-)

Reply all
Reply to author
Forward
0 new messages