If I well remember I already posted an answer for this topic, but I cannot find it, probably old pages have been removed from the forum.
Anyway if I well remember the problem was the definition of a symbol for the preprocessor, but I don't remember which one.
Please post the mysql.h header or better a sample project, and I'll take a look.