Hi!
Can anyone pls tell me that, why I can't use normal C++ classes within a QT programme. If there is any class which aren't inherited from QObject the compiler give me a linking error called,
error LNK2019: unresolved external symbol _main referenced in function _WinMain@16
I'm using Qt4.5.2 (compiled by myself) with vs2005. Pls help me to solve this !
Edit:
Example...
//UnitManager.h
class UnitManager
{
public:
//-Some code
};
//CivilizationViewer.h
class CivilizationViewer : public QMainWindow
{
Q_OBJECT
//-some code
};
//main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
CivilizationViewer w;
w.show();
return a.exec();
}
If I include UnitManager.h in CivilizationViewer.h compiler will give me that error. (eventhough I include UnitManager.h in main.cpp compiler will give me the error)