[PD-dev] [PD] opencv motion tracker external HELP!

IOhannes m zmoelnig zmoelnig at iem.at
Wed May 30 09:24:19 CEST 2007


Nose Hair wrote:
> I think I figured it out.  It looks like I have to use t_symbol *sym  
> instead of t_symbol sym and the outlet has to be x->outlet_new(x- 
>  >x_outlet0, &*sym).  That seemed to work.  The weird problem I am  
> having now it I get an error with the return(void *)x; I get error:
> return-statement with a value, in function returning 'void'.

in the function declaration you seem to declare your function like:
"void funname(...)"
which means that you do not intend to "return" anything.
then in the function body you do return something of type "(void*)";
this is illegal.

even you replace "void" with "int" (or any other type) this would be
illegal: a pointer to an object is not the same as an object of that type.
with "void" things are a bit more complicated (conceptually, not
practically): "(void)" is synonymous for 'nothing', whereas "(void*)" is
synonymous for 'pointer of undefined type'


> Now I see return(void *)x; on almost all the external codes so I  
> don't get it.  I am also getting an error on the void your_class_setup 
> (void) { part too.

most likely you have unmatched pairs with your paranthesis.
use an editor that does paranthesis highlighting and parantheses based
indentation to track this down. (or just read your code carefully ;-))


mfg.asd
rIOhannes




More information about the Pd-dev mailing list