The minimal test compiles and runs fine with VC++2003.

GCC 3.4.4, as supplied with Code::Blocks 1.0 RC2, apparently does not define sqrtf inside namespace std, at least not in the GNU stdc++. Someone with more knowledge of both the C and C++ standards than I could perhaps say whether this is allowed or a compliance problem. It should be noted that the library does handle floats as floats in std::sqrt.
Replacing it by std::sqrt makes the program compile and run fine.