I think your problem might have something to do with the precompiled headers.Try defininning that value in the project settings ( ++ options) and not in your code.