I still get the crt2.o not found error with TDM gcc 4.2.1 on Windows XP.
This will only, and I mean
only, result from an improper MinGW installation. Remove any and all environment variables relating to MinGW/GCC (including PATH entries), reinstall MinGW in an empty directory, and add an entry for the bin subdirectory to PATH (typically C:\MinGW\bin).
If an improperly installed GCC exists anywhere in PATH (or, for 4.2.x and earlier, in /mingw), you WILL have problems. Do NOT install MinGW on top of mSYS or mSYS on top of MinGW. Do NOT have Cygwin and MinGW in PATH at the same time.
If you only ever run MinGW/GCC from Code::Blocks, you don't even need an entry in PATH. No environment variables whatsoever are necessary.
Cheers,
John E. / TDM