I'm not able to help much, but anyway...I had similar problems when trying to build qwt library from source. I've buid it ok with mingw compiler, while with msvc I wasn't able to. So my best guess is, that compilers have subtle diferences and kind of preferences with code syntax. On qwt site, if I remember wll, you have different sources available (probalby meant for different compilers, but I'm not sure). You could also try a differnet compiler instead of gcc.