Once you've written your wrapper functions as described in the previous section, you'll need
to compile the source into an object file. On a system with GCC installed, this will probably
look like:
This should produce a file named
myPluginFuncs.o. The final step
in the process is different for each platform and is outlined below for Mac OS X, Linux and
Windows.
Once you've created the object file containing your plugin functions, you'll need to
execute a command like the following to build the plugin file.
cc -bundle -o myPlugin.o ./myPluginFuncs.o [required libraries] -bundle_loader /Applications/breve.app/Contents/MacOS/breve |
Note that the location of
breve.app
may be different on your system,
so you'll need to change part of the pathname accordingly. Regardless of the path to
breve.app
, you will need to append the text "/Contents/MacOS/breve".
The [required libraries] means that you may have to include linker options
to include any other libraries that your plugin relies on. For example, if your plugin functions
require code from the standard math library, you may need to add -lm
.
Once you've created the object file containing your plugin functions, you'll need to
execute a command like the following to build the plugin file.
ld -shared -o myPlugin.so.1.0 ./myPluginFuncs.o [required libraries] |
The
[required libraries] means that you may have to include linker options
to include any other libraries that your plugin relies on. For example, if your plugin functions
require code from the standard math library, you may need to add
-lm
.
Once you've created the object file containing your plugin functions, you'll need to
execute a command like the following to build the plugin file. You'll need to have
GNU development tools installed to follow the instructions listed below.
dlltool -z myPluginFuncs.def myPluginFuncs.o
ld -shared -o myPlugin.o myPluginFuncs.o myPluginFuncs.def path_to_breve_binary.exe [required libraries] |
The
[required libraries] means that you may have to include linker options
to include any other libraries that your plugin relies on. For example, if your plugin functions
require code from the standard math library, you may need to add
-lm
.