How should I go about compiling C++ files meant for QT?
Qt is very different from normal C++ libraries. It adds non-standard features to the language, and it includes its own "preprocessor" which you have to put your source files through before feeding them to an actual C++ compiler. You'll have to go to the Qt website for instructions on getting all of that set up.