gcc 4.5.3 Compile error on Cygwin
Brought to you by:
glennrp
Ig you could take a look at this error, I'd appreviate for suggestion.
gcc (GCC) 4.5.3
gcc -c -I/usr/local/include -I. -g -O3 -fomit-frame-pointer -Wall pngcrush.c
pngcrush.c:1257:1: error: expected declaration specifiers or '...' before '*' token
pngcrush.c:1257:1: error: expected ')' before '<<' token
pngcrush.c:1257:1: error: expected ')' before '+' token
Makefile:69: recipe for target `pngcrush.o' failed
make: *** [pngcrush.o] Error 1
Forgot to mention: compile was against libpng 1.4
Hm, the code form Git repository seems to compile fine.
FYI; Git code displays following warnings (gcc 4.5.3):
...
gcc -c -I. -O3 -funroll-loops -fomit-frame-pointer -Wall -Wshadow inffast.c
inffast.c: In function 'inflate_fast':
inffast.c:324:1: warning: visibility attribute not supported in this configuration; ignored
gcc -c -I. -O3 -funroll-loops -fomit-frame-pointer -Wall -Wshadow inflate.c
gcc -c -I. -O3 -funroll-loops -fomit-frame-pointer -Wall -Wshadow inftrees.c
inftrees.c: In function 'inflate_table':
inftrees.c:330:1: warning: visibility attribute not supported in this configuration; ignored
gcc -c -I. -O3 -funroll-loops -fomit-frame-pointer -Wall -Wshadow trees.c
trees.c: In function '_tr_init':
trees.c:410:1: warning: visibility attribute not supported in this configuration; ignored
trees.c: In function '_tr_stored_block':
trees.c:883:1: warning: visibility attribute not supported in this configuration; ignored
trees.c: In function '_tr_align':
trees.c:919:1: warning: visibility attribute not supported in this configuration; ignored
trees.c: In function '_tr_flush_block':
trees.c:1020:1: warning: visibility attribute not supported in this configuration; ignored
trees.c: In function '_tr_tally':
trees.c:1071:1: warning: visibility attribute not supported in this configuration; ignored
trees.c: At top level:
trees.c:1244:1: warning: visibility attribute not supported in this configuration; ignored
trees.c:1244:1: warning: visibility attribute not supported in this configuration; ignored
gcc -c -I. -O3 -funroll-loops -fomit-frame-pointer -Wall -Wshadow uncompr.c
gcc -c -I. -O3 -funroll-loops -fomit-frame-pointer -Wall -Wshadow zutil.c
zutil.c: In function 'zcalloc':
zutil.c:308:1: warning: visibility attribute not supported in this configuration; ignored
zutil.c: In function 'zcfree':
zutil.c:316:1: warning: visibility attribute not supported in this configuration; ignored
Those warnings (about inffast, etc.) are all from zlib. Please report what version of zlib (libz) you used,
if it wasn't the one bundled with pngcrush.
Also, in the original report, I'm not sure what version of pngcrush.c you tried to compile.
The original pngcrush version was old one (but never mind that, I use the Git).
The Git version was compiled against zlib0 1,2.5 (those warnings)