Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Компилиране на Qt за Linux
Qt е много голяма библиотека, има множество модули, конфигурационни опции и избираеми допълнителни възможности. Изправени пред компилирането от изходен код, може да се окаже доста трудна задача да инсталирате зависимостите на Qt, от които се нуждаете, и как да накарате някои от по-скритите му възможности да се включат при компилирането!
Пакетите, които можете да считате като "стандартни минимални изисквания" под Linux са: ZLib, JPEG, TIFF, MNG, PNG, OpenGL, GStreamer, ALSA, FreeType, FontConfig, CUPS, D-Bus, X*, OpenSSL и SQLite.
Следва подробен списък с имената на пакетите на зависимостите за всички версии на Qt между 4.5 и 4.8 В момента само имената на пакетите от Ubuntu са включени.
Колоната "Модул" показва модула от най-ниско ниво, който използва зависимостта (примерно, ако QtCore я използва, тя няма да бъде включена в списъка за QtGui). Множество модули са изброени, само ако те са независими.
Dependency | Module | Configure switch | Qt/X11? | Qt/Embedded? | Qt 4.5 | Qt 4.6 | Qt 4.7 | Qt 4.8 (trunk) |
---|---|---|---|---|---|---|---|---|
ZLib | QtCore | -[qt|system]-zlib | X | X | X | X | X | X |
JPEG | QtCore | -[qt|system]-libjpeg | X | X | X | X | X | X |
TIFF | QtCore | -[qt|system]-libtiff | X | X | X | X | X | X |
MNG | QtCore | -[qt|system]-libmng | X | X | X | X | X | X |
PNG | QtCore | -[qt|system]-libpng | X | X | X | X | X | X |
OpenGL | QtOpenGL | -opengl | X | X | X | X | X | |
OpenGL ES 1 | QtOpenGL | -opengl es1 | X | X | X [1] | X | X | X |
OpenGL ES 1 CL | QtOpenGL | -opengl es1cl | X | X | X [1] | X | X | X |
OpenGL ES 2 | QtOpenGL | -opengl es2 | X | X | X [1] | X | X | X |
EGL | QtOpenGL | -egl, -opengl [1|1cl|2] | X | X [2] | X | X | X | X |
OpenVG | QtOpenVG | -openvg | X | X | X | X | X | |
ShivaVG | QtOpenVG | -openvg | X | X | X | X | X | |
DirectFB | QtGui | -[qt|plugin]-gfx-directfb | X | X | X | X | X | |
GStreamer [2] | Phonon | -phonon | X | X | X | X | X | X |
PulseAudio | Phonon | -phonon-backend | X | X | X | X | X | |
ALSA | QtMultimedia | -multimedia | X | X | X | X | X | |
NAS Sound | QtGui | -system-nas-sound | X | X | X | X | X | |
FreeType | QtGui | -freetype | X | X | X | X | X | X |
FontConfig | QtGui | -fontconfig | X | X | X | X | X | |
tslib | QtGui | -[qt|plugin]-mouse-tslib | X | X | X | X | X | |
Cups | QtGui | -cups | X | X | X | X | X | X |
D-Bus | QtDBus | -dbus[-linked] | X | X | X | X | X | X |
ICD | QtNetwork | -icd | X | X | X | X | ||
GLib | QtCore | -glib | X | X | X | X | X | X |
GTK | QtGui | -gtkstyle | X | X | X | X | X | |
X11 | QtGui | none | X | X | X | X | X | |
XShape | QtGui | -xshape | X | X | X | X | X | |
XCursor | QtGui | -xcursor | X | X | X | X | X | |
XFixes | QtGui | -xfixes | X | X | X | X | X | |
XRandr | QtGui | -xrandr | X | X | X | X | X | |
XRender | QtGui, QtWebKit | -xrender | X | X | X | X | X | |
XVideo | Phonon, QtMultimedia | -xvideo | X | X | X | X | X | |
Xinerama | QtGui | -xinerama | X | X | X | X | X | |
XInput | QtGui | -xinput | X | X | X | X | X | |
Session management | QtGui | -sm | X | X | X | X | X | |
OpenSSL | QtNetwork, QtWebKit | -openssl[-linked] | X | X | X | X | X | X |
Interbase | QtSql | -[qt|plugin]-sql-ibase | X | X | X | X | X | X |
MySQL | QtSql | -[qt|plugin]-sql-mysql | X | X | X | X | X | X |
ODBC | QtSql | -[qt|plugin]-sql-odbc | X | X | X | X | X | X |
PostgreSQL | QtSql | -[qt|plugin]-sql-psql | X | X | X | X | X | X |
SQLite 2 | QtSql | -[qt|plugin]-sql-sqlite2 | X | X | X | X | X | X |
SQLite 3 | QtSql | -[qt|plugin]-sql-sqlite | X | X | X | X | X | X |
TDS | QtSql | -[qt|plugin]-sql-tds | X | X | X | X | X | X |
Dependency | Ubuntu Lucid | Ubuntu Maverick |
---|---|---|
ZLib | zlib1g-dev | zlib1g-dev |
JPEG | libjpeg62-dev | libjpeg62-dev |
TIFF | libtiff4-dev | libtiff4-dev |
MNG | libmng-dev | libmng-dev |
PNG | libpng12-dev | libpng12-dev |
OpenGL | mesa-common-dev, libglu1-mesa-dev | mesa-common-dev, libglu1-mesa-dev |
OpenGL ES 1 | none | libgles1-mesa-dev [3] |
OpenGL ES 1 CL | none | libgles1-mesa-dev |
OpenGL ES 2 | none | libgles2-mesa-dev |
EGL | none | libgles2-mesa-dev or libegl1-mesa-dev |
OpenVG | none | libopenvg1-mesa-dev |
ShivaVG | none | none |
DirectFB | libdirectfb-dev | libdirectfb-dev |
GStreamer | libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev | libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev |
PulseAudio | libpulse-dev | libpulse-dev |
NAS Sound | libaudio-dev | libaudio-dev |
ALSA | libasound2-dev | libasound2-dev |
FreeType | libfreetype6-dev | libfreetype6-dev |
FontConfig | libfontconfig1-dev | libfontconfig1-dev |
tslib | libts-dev | libts-dev |
Cups | libcups2-dev | libcups2-dev |
D-Bus | libdbus-1-dev | libdbus-1-dev |
ICD | none | none |
GLib | libglib2.0-dev | libglib2.0-dev |
GTK | libgtk2.0-dev | libgtk2.0-dev |
X11 | libx11-dev, libxext-dev | libx11-dev, libxext-dev |
XCursor | libxcursor-dev | libxcursor-dev |
XFixes | libxfixes-dev | libxfixes-dev |
XRandr | libxrandr-dev | libxrandr-dev |
XRender | libxrender-dev | libxrender-dev |
XVideo | libxv-dev | libxv-dev |
Xinerama | libxinerama-dev | libxinerama-dev |
XInput | libxi-dev | libxi-dev |
Session management | libsm-dev | libsm-dev |
OpenSSL | libssl-dev | libssl-dev |
Interbase | firebird2.1-dev | firebird2.5-dev or firebird2.1-dev |
MySQL | libmysqlclient-dev | libmysqlclient-dev |
ODBC [4] | unixodbc-dev or libiodbc2-dev | unixodbc-dev or libiodbc2-dev |
PostgreSQL | libpq-dev | libpq-dev |
SQLite 2 | libsqlite0-dev | libsqlite0-dev |
SQLite 3 | libsqlite3-dev | libsqlite3-dev |
TDS | freetds-dev | freetds-dev |
- ↑ 1.0 1.1 1.2 Though supported, I have not been able to figure out how to build this option in Qt 4.5
- ↑ 2.0 2.1 Need to pass -DMESA_EGL_NO_X11_HEADERS to "configure" when building Qt/Embedded. Possibly this could be done via .qmake.cache?
- ↑ This also requires a provider of libGLES_CM.so.
- ↑ Using libiodbc2 instead of unixodbc is supported starting in Qt 4.6.