As I said, I followed lasly's HOWTO. And there is written about progen, tmake and make.
Progen generates pro file, which contains information about your source, header files and other.
Tmake generates makefile from pro file. It doesn't compile anything,
And then make compiles the program by following instructions from makefile.
Including moc file fixed the vtable bug. But when compiled, this program spits out segmentation fault.
#define QT_NO_DRAGANDDROP
#define QT_NO_PROPERTIES
#include <E2_EZX_ZKbMainWidget.h>
#include <E2_EZX_ZApplication.h>
#include <stdio.h>
class MyDialog : public ZKbMainWidget
{
Q_OBJECT
public:
MyDialog::MyDialog( ) : ZKbMainWidget((ZHeader::HEADER_TYPE)3, NULL, "ZMainWidget", 0)
{
printf("Woohoo");
}
};
int main(int argc, char **argv)
{
ZApplication* app = new ZApplication(argc, argv);
MyDialog* dlg = new MyDialog();
//app->setMainWidget(dlg);
//dlg->show();
app->exec();
delete dlg;
delete app;
return 0;
}
#include "band.moc"
Segmentation fould occurs when I uncomment
MyDialog* dlg = new MyDialog();
line. I also tried to compile mkpgTools by lasly, and it compiles with no problems. But when I tried to run it, it also gave me a seg fault.