Qt logo


Common Problems

Link error, complaining about a lack of vtbl, _vtbl, __vtbl or similar

This indicates that you include the Q_OBJECT macro in a class declaration and probably also run the moc, but forget to link the moc-generated object code into your executable. Read Using the Meta Object Compiler for details on how to use moc.

Using different versions of Qt on the same machine

Qt programs need the following components of the Qt distribution:

Binary packages usually consist of two parts:

Depending on how you are using Qt, you need to make specific parts of the Qt distribution available to your programs. Typical situations are described below.

To develop with Qt 1.4x use:

setenv QTDIR /opt/qt-1.44
setenv PATH ${QTDIR}/bin:${PATH}

To develop with Qt 2.x use:

setenv QTDIR /opt/qt-2.1.0
setenv PATH ${QTDIR}/bin:${PATH}

Setting the PATH ensures that the proper version of moc is being used. Your Makefile should refer to ${QTDIR}/include and ${QTDIR}/lib to include the proper header files and link with the proper libraries.


Copyright © 2000 Troll TechTrademarks
Qt version 2.1.0-beta1