X.h should be included first in X.cpp.
Also removed ms_stdint.h as it's not needed now.