Tutorial :QT4 GDB debugger doesn't link to shared libraries on Ubuntu


I'm new to UNIX and QT4 but ubuntu is coming along. My first QT4 project links a simple test app to a shared dll of ported code. I am able to build the application using QT Creator and to run it from the terminal. However the embedded GDB debugger reports: unable to load shared ... no such file or directory.

The .pro file contains the line LIBS += /home/aurel/VISUALAGEPORTS/libVISUALAGEPORTS.so.1.0.0

I was able to revert to a backup version which does run. However, the 1st time I tried to debug the restored version I encountered the same error. The second attempt mysteriously worked with no changes.

Does anyone know why the QT Creator would link correctly and produce an executable that runs from the terminal but not from the embedded debugger?

Thanks for any ideas


You can specify a search path for shared objects via LD_LIBRARY_PATH variable. I'm not sure how to do that from within QT Creator, but if I was running gdb from command line, I'd so something like this:

LD_LIBRARY_PATH=/home/aurel/VISUALAGEPORTS/ gdb path_to_executable.  

Give that a go.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »