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.
Qt programs need the following components of the Qt distribution:
Programmers need to include the Qt header files. Those with a
command-line compiler will typically use options such as /I%QTDIR%\include or -I${QTDIR}/include. They will need the header
files of the version of Qt they wish to build programs with. The
header files are in the include subdirectory of Qt distributions.
Programmers need to run the Meta Object Compiler - moc. The moc is
found in the bin subdirectory of Qt distributions.
Programmers need to link with static or shared libraries. Those with a
command-line compiler will typically use options such as /L%QTDIR%\lib\qt.lib or -L${QTDIR}/lib -lqt. They will need the
libraries of the version of Qt they wish to build programs with. The
libraries are in the lib subdirectory of Qt distributions.
Users of programs built with the shared Qt libraries need these same
shared libraries to run the programs. The libraries are in the lib
subdirectory of Qt distributions. Shared libraries are made available
to programs in places such as C:\windows\system on Windows
platforms, directories listed in file /etc/ld.so.conf on Linux,
standard lib directories on Unix, or the directories listed in the
environment variable ${LD_LIBRARY_PATH} on Unix/Linux.
Binary packages usually consist of two parts:
qt2.
qt2-dev.
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.
You build programs with a single version of Qt, but you still need to
run programs linked with another version of Qt. You are typically a
Linux developer who builds programs for Qt 2.x on a KDE desktop based
on Qt 1.4x. Qt packages are usually split into a shared library
package with a name like qt and a developer package with a name
like qt-dev. You will need the appropriate packages:
qt2-dev or the like).
qt2 or the like) and Qt 1.4x (qt1
or the like).
QTDIR.
You build and run programs for Qt v1.4x and Qt 2.x. You will need:
Get source distributions of both Qt 1.4x and Qt 2.x.
/opt or
/usr/local. In the case of /opt:
$ cd /opt $ gunzip -c qt-1.44.tar.gz | tar xf - $ cd qt-1.44 $ setenv QTDIR /opt/qt-1.44 $ configure [options] $ make $ cd /opt $ gunzip -c qt-2.1.0.tar.gz | tar xf - $ cd qt-2.1.0 $ setenv QTDIR /opt/qt-2.1.0 $ configure [options] $ make
/opt/qt-1.44 and /opt/qt-2.0.1 to your environment
variable LD_LIBRARY_PATH or make links to the libraries in a
standard directory like /usr/local/lib:
cd /usr/local/lib ln -s /opt/qt-1.44/lib/libqt.so.1 . ln -s /opt/qt-2.1.0/lib/libqt.so.2 .
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 Tech | Trademarks | Qt version 2.1.0-beta1
|