‘can’t find entry point’ of plug-ins built w/XCode?

If you’ve tried to port an existing effect plug-in to XCode, you’ve no doubt seen the pedantic “main() must return int” warning. I found a couple gotcha’s when changing the name of the entry point function; fixing these 30 or so times really drove the problem home to me.
First, update the name of your entry point function (duh). Then, change the name of the entry point function specified in your plug-in’s PiPL. While I was there, I stripped out the #ifdef __MACH__ business; the current 7.0 SDK will be the last with CFM sample projects.
Everything builds and links correctly, the plug-in loads, but when it’s applied AE can’t find the entry point? Name mangling.
Remember that CodeWarrior exported the entry point based on project settings. For the sample projects, I’ve gone through and made sure the entry point function was exported (declared) using extern “C”:
extern “C” {
DllExport PF_Err
PF_Cmd cmd,
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output,
void *extra );
Presto! Entry point found.

Comments are closed.