Try including windows.h as the first file. It is also possible that you are missing some other strange Windoze include. But I don't see what Qt Creator has to do with your problem