> I'm using GCC on linux too, so that can't be the problem, unless there is > some Windows specific quirk.
Yes, command line on windows is limited to 8191 characters. On Linux it is variable but generally much larger, you can check yours using: $ getconf ARG_MAX it is 2097152 on my machine.