Using Plugins in Simulations
<< previous | Chapter 13. Plugins | next >>

## Using Plugins in Simulations

Loading a plugin from within a simulation is relatively simple. First, place the plugin in a directory where breve will find it (either a directory in your class path, or in a directory specified with a "@path" line). Then simply load the plugin using a "@plugin" line at the top of your simulation file:

    @plugin "pluginName" (pluginEntryFunction).

The plugin file specified with `@plugin` does not always have the extension ".o". The specific type of file expected by the `@plugin` directive varies by platform. On Linux, the file is normally a shared object file (`pluginName.so`). On Mac OS X, plugins are OS X "bundle" files (`pluginName.o` or `pluginName.bundle`). On Windows, the plugin file is a DLL (`pluginName.dll`).

Assuming that breve is able to locate and load your plugin file and the corresponding class files, you should now be able to use the plugin classes in your simulation.

<< previous | Up | next >>
Archiving Plugin Data With The data Type | Table of Contents | Chapter 14. The breve Source Code