Qlist error on windows

I am trying to move a qt project from linux to windows. Although my application compiles and runs on linux, when compiling on windows I get a bunch of really ugly errors (below). I appreciate any ideas on how to solve or debug this problem.

The errors were caused by this chunk of code in qlist.h:
@
#ifndef QT_NO_STL
static inline QList<T> fromStdList(const std::list<T> &list)
{ QList<T> tmp; qCopy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; }
inline std::list<T> toStdList() const
{ std::list<T> tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; }
#endif
@
So I seem to have resolved the problem by defining QT_NO_STL in my .pro file. Since I do not use anything from the STL this is not an issue. However, its silly that the compilation of internal qt headers would be inconsistent between Windows / Linux. I'd appreciate further explanation of what exactly the above errors mean.

From experience, if something goes wrong in a third-party header file you include, then it's quite often a mistake in your own code before the #include statement, maybe indirectly through another #include statement.

You could try something very simple like:
@//Test.cpp
#include <QList>

If a file with only that content won't compile either, it would indicate that something with your build environment and/or your Qt configuration is wrong. If it does compile fine, then carefully check your other code again. In particular, I would try to strip down your code as much as possible, until it compiles through. Then re-add the code line-by-line until it fails to compile again, so you will find the "problematic" part...