The project was doing fine, running fine, compiling fine. Until some seemingly random time it stopped being fine.
At the moment I'm getting around 200 stray errors:
./new:4: error: stray '\376' in program
./new:4: error: stray '\377' in program
./new:5: error: stray '\376' in program
./new:5: error: stray '\377' in program
From reading other posts it seems I have some bad characters in my code which I cannot see. So I emptied the whole file I was working on, but no luck. This error persists whatever I do.
Also, when compiling main.cpp (which it does first), it first and foremost includes #include <QApplication>, which is the start of the chain of "from 'file'" messages. This means it didn't really parsed much of main.cpp yet, but gets borked from reading internal Qt files.
I'm totally gazing in the dark here, what could this possible be, and how would I resolve this?
I'm using Qt 4.7.2, GCC 4.5.0 and Windows 7.
Copy your code into Notepad and save it. Then remove your main.cpp and add the Notepad one to your project. Rebuild and check the result.
If it still persists then most probably the problem is not with your source, but with the Qt or gcc and/or gnulibc libraries. They probably got corrupted or are stored in a different, unsupported encoding.