Different parameter order for GCC on Cygwin and Linux

For a test program, test.c, that used library libjpeg, both
gcc test.c -ljpeg -o test
and
gcc -ljpeg test.c -o test
worked on Linux (CentOS 5), but only the former worked on Cygwin. Odd.

Another difference is the ZLIB library. In linux, I compiled using -lz, while on cygwin, I use -llibz

Leave a Reply