Please make sure you have copied TMSDEFS10.INC to TMSDEFS.INC and replaced it with the TMSDEFS.INC file in the folder where you placed iw10qb2010.dproj and amsql2010.dpk
When the files are unpacked tmsdefine.inc and tmsdefine10.inc are in 3 places: the target folder, common and source folders. I renamed the first instance and copied it to the other locations, but still got the same errors.
I had to remove the Query Studio package from my development environment, completely. After that everything worked as it was supposed to. I am currently not using that product, but installed it as part of my subscription.