 |
|
 |
|
Next: A two liner that won't compile on CW 9.5
|
| Author |
Message |
External

Since: Jul 05, 2006 Posts: 1
|
(Msg. 1) Posted: Wed Jul 05, 2006 8:43 am
Post subject: Compile error with filter function Archived from groups: comp>sys>mac>programmer>codewarrior (more info?)
|
|
|
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 >> Stay informed about: Compile error with filter function |
|
| Back to top |
|
 |  |
External

Since: Apr 25, 2004 Posts: 974
|
(Msg. 2) Posted: Wed Jul 05, 2006 4:33 pm
Post subject: Re: Compile error with filter function [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
In article ,
"Mythic Wave" 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. >> Stay informed about: Compile error with filter function |
|
| Back to top |
|
 |  |
| Related Topics: | Win compile error with CW 8 - Hi im compiling a small library for windows and im getting 3 undefined symbols. Could anyone point me to the library i need to include in the project? Or maybe what might be going wrong? I have these libs in the project already in this order: ..
Windows compile error - Im in CW 8 for mac and i keep getting this error when compiling for windows: Error : Bad magic signature (expected '!<arch>\n') libpq.lib Is there any way to fix this? What does this mean? thanks! -- Alex Cohen
compile-error in header - hello i want to compile a library, but get a compile-error if i want to make it. the error occurs in a header-file and is cpp-code. Error : illegal access/using declaration eyefinder.h line 84 GPrior MPEyeFinder::setROI(FaceObject* &face,..
Compile error with CodeWarrior 8 on Panther - I am using CodeWarrior Development Studio, Mac OS X Edition Version 8 on Mac OS X 10.3.2 I had a project which compile successfully on Mac OS X 10.2.8. Now, since I have upgraded the operating system, I get the following errors: Error : ';' expecte...
division by 0 error at compile time? - Warning : division by 0 HelloWorld.cp line 36 } I probably should file a bug report but want to ask here first to make sure it's not me. I just upgraded to 9.3 and run into this error when compiling with global optimization level 4: Warning :.. |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|