Hi!

Compiling mp3_encoder.c fails on cygwin that way:

mp3_encoder.c:69: error: parse error before "else"
mp3_encoder.c:69: warning: type defaults to `int' in declaration of `cc'
mp3_encoder.c:69: error: `c' undeclared here (not in a function)
mp3_encoder.c:69: warning: data definition has no type or storage class
mp3_encoder.c:69: warning: type defaults to `int' in declaration of `sz'
mp3_encoder.c:69: error: `s' undeclared here (not in a function)
mp3_encoder.c:69: warning: data definition has no type or storage class
mp3_encoder.c:69: error: parse error before '}' token

I guess this is caused by excessive ^M in the file. This will split a
macro, so it is seen like that:

#define putlong(c, s)  if(s+sz <= 32) { cc = (cc << s) | c;      sz+= s; } \


                       else           { putbits(cc, sz); cc = c; sz = s; }

Under *nix ^M are ignored, so most probably no problem there.

Stripping the file for example with

# sed "s/Finest Music Player Firmware//g" mp3_encoder.c >mp3_encoder.c.okay

will fix that issues and the result cleanly compiles.

cu
John

P.S.: Anyone may fix that giving credit to whoever she wishes. ;-)

Reply via email to