Sample - Tutorial on Ubuntu

Does anyone have the tutorial code from the sample/tutorial directory running on linux? I finally learned enough about automake/autoconf to get it to compile, but now I get a lot of undefines for vtable & program-name::staticMetaObject. I think they are related but don't know how to proceed.

Roman Lygin's picture

staticMetaObject() is Qt related stuff. Make sure Qt is in your build path, that you have generated moc_*.cpp files and so forth. If you are totally unfamiliar with Qt you might want to read a little bit on it (see
If there is a .pro file accompanying the sample you rather need to use it to build the project.

Hope this helps a bit.

--- - blog on Open CASCADE

redden's picture

Thanks for the help. I have the program compiled and linked. But the menus and icons are missing. There is a res file with icons but I have not found out how to tell the program how to find them. I ordered the book "C++ GUI Programming with Qt 4, Second Edition" from the trolltech site.

Matthias Teich's picture

As a quick fix you can just copy the resource file to the folder the *.exe lies in.

Mark's picture

Are you using qmake? IMO, it would be difficult to get autotools to work right with Qt.

Take a look at , and especially the tutorial linked from that page.

When you have a .pro file set up, just run qmake to generate the Makefile, and then make to compile.


redden's picture

I did get the tutorial program to run using qmake, but it has two problems. I found one using gdb debugger. It was a bad .png file used for an icon. But when the program exits there is an error about a double free or corrupted memory.

Dirk B's picture

I sometimes had this kind of error after adding to the Qt project, too. A
make clean, qmake, make
in the project usually solved this.