Solved Library errors when debugging with Qt Creator
-
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 -
@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 -
@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 -
@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 -
@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 -
@tkansgar so please close this thread as solved now. thanks