Quote Originally Posted by TonyInSoMD View Post
I had a command line server program written, and I thought it would just be a matter of adding/changing a few lines of code to make it a QtService. Didn't work. I tried making a blank one from scratch in Visual Studio 2013. Started out I made a command line (QCoreApplication) project. Then I tried to create an empty service using add class. Named the class MyService (I had to call it something) made the base class QCoreApplication, left constructor signature blank. Once created, I put all the appropriate values in the constructor. I then added "qtservice.h" and added the code to make it a QtService<QCoreApplication>.
Then I added all the virtual functions. I left them as empty functions. What it looks like when the compile fails is that QtService<QCoreApplication> is not inheriting QObject. A while back I made a gui service but you can't do that anymore so it got scrapped but I still have the code. On that one I used QtWidgets/QApplication to make an application and then changed the .h and .cpp files to match a QtService, included the .h file, and added the necessary functions (start, stop, etc.) and it compiled fine. I checked the project settings and they are all set to include qtservice. I also tried it with and without Q_OBJECT* at the beginning of the class. What am I doing wrong? added this after post. I'm getting error C2039 staticMetaObject is not a member of QtService<QCoreApplication>. When I looked it up online it said in several places that it's not inheriting QObject.
but what exactly was the C2039 error?
because I have always found this error