Hello,
I've just switched from CodeWarrior 9 to 10 and am getting the
following compile error. It didn't occur with CW 9.
Error : function call '[VoCompApp].NewNavObjectFilterUPP(pascal
unsigned char (*)(AEDesc *, void *, void *, short))' does not match
'NewNavObjectFilterUPP(pascal extern "C" unsigned char (*)(AEDesc *,
void *, void *, short))'
I've declared my filter function as follows:
static pascal Boolean MyFileFilter(AEDesc *theItem, void *info, void
*callBackUD, NavFilterModes filterMode) {...}
I've created the function pointer as follows:
g_FilterProc = NewNavObjectFilterUPP((pascal Boolean (*) (AEDesc *,
void *, void *, NavFilterModes))MyFileFilter);
Any help would be appreciated.
Thanks,
Brian
David Phillip Oster - 05 Jul 2006 17:33 GMT
> Hello,
>
[quoted text clipped - 17 lines]
>
> Any help would be appreciated.
The error message is saying that your filter function was declared
inside an
extern "C" {
.... declaration here...
}
but the NewNavObjectFilterUPP isn't (or vice versa.)
Since extern "C" declarations nest, you can wrap it around #include's:
extern "C" {
#include <NavServices.h>
}
but you might have to do it in your precompiled header build file
(.pch++) for it to take effect.