[Qt-interest] Qt on Linux

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Fri Jan 9 13:11:32 CET 2009


manish.s.sharma at nokia.com wrote on Friday, January 09, 2009 10:42 AM:

> Hi,
>
> I have a installed Qt in Linux. I have installed Kdevelop as well. I
> started debugging my test application and somewhere it is causing a
> segmentation fault. But I am not able to get in to the source file of
> Qt during debugging. It seems my program is hitting the release
> version. Following the call stack:
>
>
> #0 ??
> /usr/lib/libQtCore.so.4 #1 ??
>...

Your program is hitting the release libraries because you linked against them (libQtCore.so)! The DEBUG Qt libraries contain a 'd' in their name (libQtCored.so), so there is no way your application could "accidentally" mix them up at runtime (depending on the LD_LIBRARY_PATH for example, which defines where to look for libraries basically).

So make sure that your application links against the 'd' Qt libraries - I don't know KDevelop very well, but e.g. in Visual Studio you have a debug and release configuration where you explicitly set the libraries to link against.

In case of a *.pro file/qmake approach I would assume that when you do a

%> make debug

that qmake will automagically link against the proper 'd'(ebug) Qt libraries (if they are available at all), but not sure about that...

> If I click on above list in the call stack view. I am not able to get
> in to the soure code of those..? I am very new to Linux also.

@nokia? Can't you just knock on the next office door and ask for help now? ;)


Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22




More information about the Qt-interest-old mailing list