Library errors when debugging with Qt Creator



  • Hi all,

    I develop under Ubuntu 14.04, use Qt Creator 3.6.0 (based on Qt 5.5.1) and debug my qt programs with it for many years now. But since I ported the source code from Qt 4.8.7 and linked it to Qt 5.10.0, I cannot debug my programs with Qt Creator. The output in xterm window displayed by Qt Creator is like this:

    /home/<path-to-my-qt-program>: /opt/qt/qtcreator-3.6.0/lib/Qt/lib/libQt5Core.so.5: no version information available (required by /home/<one-of-my-so-libs>)

    Many similar lines with different so-libs and different Qt5-so-libs follow here.

    Outside of Qt Creator my programs run properly. Obviously the Qt5-so-libs of the Qt Creator installation instead those of my Qt 5.10.0 installation are loaded when starting the debug session by Qt Creator.

    I substituted the path to /opt/qt/qtcreator-3.6.0/lib/Qt/lib by the path to the so-libs of my Qt 5.10.0 installation in LD_LIBRARY_PATH and PATH in the execution environment settings of the Qt Creator project. But this didn't help. What must be done to debug a program linked to Qt 5.10.0 using Qt Creator 3.6.0 based on Qt 5.5.1?

    Kind Regards
    tkansgar


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What's fishy in the first place is that you are trying to use the Qt Version from Qt Creator rather than a standalone Qt.

    Why are you doing that ?



  • Hi SGaist,

    Qt Creator didn't run with my Qt 5.10.0 installation. I had to set its LD_LIBRARY_PATH to its own Qt 5.5.1 lib path in qtcreator.sh (see https://bugreports.qt.io/browse/QTCREATORBUG-19611). So, how do I direct Qt Creator to start the debug session with the lib set of Qt 5.10.0 instead of its own Qt 5.5.1?

    Kind Regards
    tkansgar


  • Qt Champions 2017

    @tkansgar I'd recommend using the online installer to do a clean install of Qt 5.10 together with a recent QtCreator version.

    That should work well on Ubuntu 14.04 without tricks (but only if you using 64bit, there are no 32bit binary packages for newer Qt/Creator versions).



  • Hi aha_1980,

    my Qt 5.10.0 installation is definitely clean, and that of Qt Creator 3.6.0 too. Is it really not possible to start a debug session using another Qt 5 version as Qt Creator uses? So I have to upgrade Qt Creator too, when I upgrade the Qt 5 version for my programs?

    Kind Regards
    tkansgar


  • Qt Champions 2017

    @tkansgar said in Library errors when debugging with Qt Creator:

    Is it really not possible to start a debug session using another Qt 5 version as Qt Creator uses?

    I didn't say it is impossible. Indeed, Qt Creator can handle other Qt versions and I do this all day.

    So I have to upgrade Qt Creator too, when I upgrade the Qt 5 version for my programs?

    No, you don't have. I just wanted to point out, if you install both Qt and Creator with the online installer you get a running system without manual intervention.

    And ... there were 6 QtCreator releases after 3.6.0, with the 7th already in beta phase. I personally would not spend a minute configuring such an old version.



  • Hi again,

    ok, I understand. But not any one did answer my question until now:

    So, how do I direct Qt Creator to start the debug session with the lib set of Qt 5.10.0 instead of its own Qt 5.5.1?

    You say, you do this, but how do you do it?

    Kind Regards
    tkansgar


  • Moderators

    @tkansgar In my opinion the correct question is: how did you manage to let QtCreator use its own Qt libs for your app? You should check the Kit you're using in QtCreator whether it is configured correctly.



  • Hi jsulm,

    thanks for your reply! I didn't manage to let QtCreator use its own Qt libs for my apps. Instead I managed to start QtCreator using its own Qt libs. And until now I never saw any need to configure any kit in QtCreator. Can you give me a little lesson, how I have to do the configuration? Keep in mind, that some other apps I develop, use Qt 4.8.7, which I want to debug with the same QtCreator. Seems, that I need two differently configured kits.

    Kind Regards
    tkansgar


  • Qt Champions 2017

    @tkansgar The basic steps are described here:

    http://doc.qt.io/qtcreator/creator-targets.html

    In short: you need to setup a compiler and a debugger (in Linux you use the existing ones), add a Qt version by selecting it's qmake and then combine everything to a Kit. Voila.

    As said, that is all automatic when installing by the online installer.



  • Hi,

    I just configured two kits, one for Qt 5.10.0, and one for Qt 4.8.7. QtCreator knows both of them. No need to add one. At Qt Version I selected the desired one, and at Environment I set LD_LIBRARY_PATH to not contain the Qt 5.5.1 lib path but the path to the libs of the desired Qt version. In the project settings under build & run I switched the kit from the default named "Desktop" to my new Qt 5.10.0 kit. Then I started a debug session. But that uses the libs of Qt 5.5.1 from the QtCreator lib path anyway. The errors remain the same as in my first posting here. Anything is missing, but what?

    Kind Regards
    tkansgar



  • Hi again,

    I think, now I have found and fixed my misstake: I always started the debug session by using the menu entry "Debug external application". In this dialog I could specify all relevant data like the path to the executable, the command line arguments and the execution directory. Now I found, that there also is a selection for the kit to use, which I ignored until now. But its selection list is empty (cannot be opened), although the "Manage" button is accessible and my new kits are known there.

    I then copied the execution data from this dialog to the execution data in the project settings and then used the menu entry "Debug without deployment", and now the debug session is running.

    Many thanks for your help here
    tkansgar


  • Qt Champions 2017

    @tkansgar so please close this thread as solved now. thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.