Turns out that SDL2 has a bug in its SDL_platform.h header file. Version 2.0.3 has this bug, and it has been known about since March. The solution is to download version 2.0.2 and copy and paste the old SDL_platform.h into the new. It’s extremely frustrating, but hopefully I’ll have a solution now.
Now I’m getting a bunch of undefined reference errors. Not fun.
Edit: Turns out the undefined reference errors were because I linked to the 64 bit libraries accidentally. I actually knew it was going to be something simple so I wasn’t too worried. And on the bright side, SDL2 is finally working!