cannot solve this problem in compiling

Sergio Villone s.villone@lobinhos.com
Thu Feb 5 16:18:00 GMT 2004


>
>Sergio Villone wrote:
>
>>I just cannot manage to understand why the statement:
>>typedef int (FACopyProgressProc)(long par, long value, long max);
>
>>gives the error:
>>  error: two or more data types in declaration of `FACopyProgressProc'
>>and not once but four times for the same line...
>>this with gcc 3.3 under mac os X
>>can anybody help me?
>
>I assume that what you want is:
>   typedef int (* FACopyProgressProc)(long par, long value, long max);
>   // missing '*' before FACopyProgressProc


>yes, this was what I was doing in the first time, then  I removed 
>the '*', just for trying if would change things, but it didn't: 
>always the same dreaded " error: two or more data types in 
>declaration of `FACopyProgressProc'"; I must stress the fact that 
>the original line (i.e. with the '*') does compile without any 
>glitch with other C compilers, such as  CodeWarrior, for instance, 
>but now I have to recompile all the stuff under Linux, and my first 
>pass was trying with gcc..
>i.e. you are trying to create a function pointer. You can then do:
>   FACopyProgressProc proc = &ProgressProc;

yes, precisely, but as I just said I was in despair, an tried 
everything (almost) to give up that obscure error message...even 
randomly...just to see what it happens.. I even looked up that 
message with google and found a pair of request about it in other 
lists, but apparently nowhere a clearer explanation of the error was 
given!
anyway thanks for answering!
Sergio

>   // ...
>
>Regards,
>Reece Dunn
>
>_________________________________________________________________
>It's fast, it's easy and it's free. Get MSN Messenger today! 
>http://www.msn.co.uk/messenger



More information about the Gcc-help mailing list