Programs That Support Plugins

From WxWiki

Jump to: navigation, search

[edit] If the 'host' program uses wxWidgets

Example: http://atol.sf.net/old/plugin_test.zip (This link no longer works either, the sample file might be available from http://prdownloads.sourceforge.net/atol/atol_plugins-0.5.9_src.zip?download )

The following example, contributed by Frank, is based on wxMinimal example, comes with all sources and compiles under Linux as well as under Windows it should be easy to extend the example of individual needs. Sources can be found under: http://gaos.org/~schleif/portable_plugin_example.tar.gz

Example: http://bzzt.net/~wxwidgets/PluginExample.zip (Thanks Noel!)

This example, written by Raphael Juchli, is a *very* minimal example, but demonstrates bi-directionality for a plugin, built against 2.5.1 on Linux and Windows, and 2.4.2 under Windows (not tested with this version under Linux), it demonstrates a way for the plugin and main app to communicate with each other.

Both of the last mentioned examples are great stuff except one exception: They don't take care of proper memory managment. They both don't unload the plugin libs after usage, which causes memory leaks. So keep in mind you need to unload all dynamic libs, if you don't need them any more. ( @ autors of plugin examples : maybe you could fix this ).

In new versions of wx, problem with crashing application during creating wx object by our dynamically loaded library can be resolved by using wxWidgets compiled as a DLL. Compiled DLL version of wx can be found at http://wxpack.sourceforge.net/ (Problem occurs surely in libraries and programs compiled with wxDev-C++, when both host and DLL use wx)

[edit] If the 'host' program doesn't use wxWidgets

But has its own message pump etc.

See also:

Personal tools