[LONG] Re: Conflit entre paquet Qt
* Thiébaud Weksteen <t13b0@free.fr> [2005-05-03 17:38] :
> Bonjour,
>
> Je désire compiler une application utilisant la librairie Qt.
> Cependant, j'ai besoin à la fois du fichier
> d'entete "qgl.h" pour integrer OpenGL à Qt et de la librairie "libqt.so".
> Le problème est que le premier fichier est contenu dans le paquet
> libqt3-mt-dev, le second dans libqt3-dev et bien evidemment ces 2
> paquets sont incompatibles entre eux ( l'un desinstalle l'autre et
> vice-versa).
> Comment faire pour dépasser ce problème ?
Il faut aller lire les descriptions des paquets :
Package: libqt3-mt-dev
Description: Qt development files (Threaded)
Qt is a C++ class library optimized for graphical user interface
development. This package contains the libqt-mt.so symlink, necessary
for building threaded Qt applications as well as the libqui.so symlink
and the necessary header files for libqui.so. (See README.Debian and
the Qt Documentation for instructions on libqui.so)
[...]
Package: libqt3-dev
Qt is a C++ class library optimized for graphical user interface
development. This package contains libqt-mt.so symlink, necessary
for building threaded Qt applications.
.
WARNING: The nonthreaded version of Qt3 is considered deprecated and
may disappear anytime in the future. Please use libqt3-mt-dev instead
(Read README.Debian for instructions).
[...]
A priori, il faut donc privilégier la version mt (multi-threadé).
Ensuite, on va lire le fichier README.Debian comme indiqué (après avoir
installé libqt3-mt-dev) et :
The Qt packages itself are built in two different versions: dynamic
non-threaded and threaded. Each of these builds have specific differences
that you need to watch out for. The Qt package for Debian is optimized
on working with the threaded version, so application developers are advised
to use libqt-mt.so (by installing libqt3-mt-dev) for development.
The specific configuration differences are:
a) non-threaded(shared library)
The non-threaded library has some restrictions for the developer of Qt
applications, where some are Debian specific and some Qt specific:
- the library is called libqt.so and is placed under /usr/lib.
- the plugins built with this version are always using the extension
<plugin>-non-mt.so, to indicate that they are to be used with the non-mt
(multithreaded) version. The plugins itself will install into the same
directory where the threaded version is placing its plugins too, so
that applications will all find the Qt plugins independed of the
version of Qt that they make use of.
- Qt OpenGL is not supported in the non-threaded version due to the fact
that OpenGL on Debian is built threaded. If you write any program that
you explicitely link against -lqt and that does make use of the QGL
classes, you will get symbol referencing errors. Change the linking
stage to link your application against the threaded version,-lqt-mt.
- The libqui library is not available for non-threaded programs. That means
in case a program that links against the non-threaded Qt library (-lqt)
and is also linking against libqui.so (-lqui) will not link. Instead,
change the linking of the program to -lqt-mt -lqui to make that work.
For other notes, see c) common build configuration.
b) threaded (shared library)
The threaded library version is the one supporting the maximum of Qt's
options and is to be preferred by application developers. The reasons for
that are mainly that it allows the use of threading as well as OpenGL, in
addition to that the project that makes the most use out of Qt, the KDE
project (http://www.kde.org) uses the threaded version by default also.
That means that a KDE user always already has the threaded library loaded
in his machine's memory. To have the minimum demands and maximum
performance for your application at run-time for the user's machine, it is
therefore best to link the application against the threaded version.
NB: for Debian package maintainers: If the Qt application you are building
links against -lqt, change the Makefiles in a way that it links against
-lqt-mt. Contact the author of the application you package to change the
linking from -lqt to -lqt-mt (because all other distributions are doing the
same, defaulting on the threaded version). The library itself is called
libqt-mt.so and is to be found under /usr/lib.
Un peu long, mais tu as l'intégralité de l'explication concernant la
présence de qgl.h dans un fichier et dans l'autre ainsi que sur la
différence entre les 2 paquets : il faut que tu adaptes le programme à
compiler pour qu'il soit lié avec libqui.so au lieu de libqt.so.
Fred
--
Comment poser les questions de manière intelligente ?
http://www.gnurou.org/documents/smart-questions-fr.html
Comment signaler efficacement un bug ?
http://www.chiark.greenend.org.uk/~sgtatham/bugs-fr.html
Reply to: