Sudden ofxOAuth compile errors "Expected identifier"

So I’ve been using ofxOAuth and it had been working fine, but every so often, after adding in chunks of code, I get this complaint when I try to compile:

I’m not sure what the error means. Sometimes it seems like it stops working for no reason. The only solution I’ve found is to make a copy of an app that doesn’t have that problem and then start adding in code again bit by bit. Any ideas?

Well I just solved it and feel kind of dumb because it was such a simple fix, but I’d still like to know more about the error. Basically I added in a thread.h file from another app, and then put the #include "thread.h" at the top my includes. What I think happened was this: something in there defined OFX_HTTP_GET and OFX_HTTP_POST as 0 and 1, so that when this code ran, they were already defined and it caused an error.

Does this sound plausible? This is the first I’ve ever run into #includes messing each other up. Does this happen a lot? What’s the best practice for avoiding this?