All sources and includes must be located in "include" and "source" directories.
Every plugin must contain $full_plugin_name$_prerequisites.h file, located in "include" directory:
#include "prerequisites.h" #if PLATFORM == PLATFORM_WIN32 & !defined(__MINGW32__) & !defined(STATIC_LIB) # ifdef $FULL_PLUGIN_NAME$_PLUGIN_EXPORTS # define _GpuCalc$plugin_name$Export __declspec(dllexport) # else # if defined (__MINGW32__) # define _GpuCalc$plugin_name$Export # else # define _GpuCalc$plugin_name$Export __declspec(dllimport) # endif # endif #elif defined(GCC_VISIBILITY) # define _GpuCalc$plugin_name$Export __attribute__((visibility("default"))) #else # define _GpuCalc$plugin_name$Export #endif
Where $FULL_PLUGIN_NAME$, $PLUGIN_NAME$, $plugin_name$ are full uppercase plugin name, uppercase plugin name and lowercase plugin name respectively.
This file must be included in file where we declare two "C" functions, something like this:
extern "C" void _GpuCalc$PLUGIN_NAME$Export dllStartPlugin() throw() { //This function always called when starting our plugin. } extern "C" void _GpuCalc$PLUGIN_NAME$Export dllStopPlugin() throw() { //This function always called when stopping our plugin. }
static $FullPluginName$Plugin * $PluginName$Plugin;