Just in case anyone else has this problem, it looks like gcc 2.9.5 automatically scoped std::, but 3.1 doesn't. Adding std:: to the STL stuff fixed it. I also needed to use the 'typename' keyword in a few new places.
The biggie was that I was getting link errors on everything in the STL until I created a new project and moved all of the source files into it. I'd tried tossing the 'build' folder, cleaning targets, and rebuilding the index, but that didn't work. Creating a new project did.