Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: mp3_encoder.c does not compile with cygwin

mp3_encoder.c does not compile with cygwin

From: john <ruttmannn_at_gmx.de>
Date: Thu, 6 Apr 2006 12:14:02 +0200

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. ;-)
Received on 2006-04-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy