Talk About Network

Google





Mac > Code warrior for Mac > Re: Compile err...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 2149 of 2233
Post > Topic >>

Re: Compile error with filter function

by David Phillip Oster <oster@[EMAIL PROTECTED] > Jul 5, 2006 at 04:33 PM

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.
 




 2 Posts in Topic:
Compile error with filter function
"Mythic Wave" &  2006-07-05 08:43:51 
Re: Compile error with filter function
David Phillip Oster <o  2006-07-05 16:33:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 16:23:19 PST 2009.