All source files that include hollywood/plugin.h
need to be compiled with certain
preprocessor commands defined, depending on the platform. Here is a list of preprocessor
commands that may need to be defined, depending on your platform:
HW_AMIGAOS3
HW_AMIGAOS4
HW_ANDROID
HW_AROS
HW_LINUX
HW_LITTLE_ENDIAN
HW_MACOS
HW_MORPHOS
HW_WARPOS
HW_WIN32
Also make sure to use the HW_EXPORT
macro on all function declarations that you export as
shared library functions to Hollywood, i.e.
HW_EXPORT int InitPlugin(hwPluginBase *self, hwPluginAPI *cl, STRPTR p) { ... } |
Finally, don't forget to target your plugin for the right architecture. The 32-bit version
of Hollywood can only load plugins compiled for a 32-bit architecture whereas the 64-bit
version can only load plugins compiled for 64-bit. Modern compilers often default to 64-bit
binaries nowadays so keep in mind that these binaries can't be loaded by the 32-bit versions
of Hollywood. To make it easier for you to distinguish between 32-bit and 64-bit builds,
the Hollywood SDK will automatically define the HW_64BIT
preprocessor constant when it
has detected that you are building for a 64-bit target.
On AmigaOS you also need to make sure that you do not link the compiler's startup code against the plugin as this can cause conflicts. You also must not use any library auto-open features provided by the compiler. You need to manually open all Amiga libraries that your plugin requires. See AmigaOS C runtime limitations for details.