In article <1152114231.659381.292060@[EMAIL PROTECTED]
>,
"Mythic Wave" <brianleader@[EMAIL PROTECTED]
> wrote:
> 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.
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.


|