modified all compile and linkage errors, use TParser as library