Okay, I figured it out. I'd been explicitly linking the user32/gdi32 libraries, using the full path name. I'm an idiot.
Sorry for the waste of forum space. At least anyone else who searches for that should find this solution, though (I did do a search before posting).