Cannot debug shared library
-
I have a qt built shared library that I am trying to attach to my exe to debug and get the following when debugging:
This does not seem to be a "Debug" build. Setting breakpoints by file name and line number may fail.
All the debug settings seem to correct. The QT libraries are dynamically linked and I have built those with debug usingwindeployqt
with debug parameter. -
@kncy9876 said in Cannot debug shared library:
and I have built those with debug using windeployqt
windeployqt does not build anything.
Is the shared lib you're trying to debug a debug or release build? The error clearly states that it is not a debug build. -
@jsulm said in Cannot debug shared library:
@kncy9876 said in Cannot debug shared library:
and I have built those with debug using windeployqt
windeployqt does not build anything.
Is the shared lib you're trying to debug a debug or release build? The error clearly states that it is not a debug build.Its definitely debug, I have all applicable settings set for debug too (separate debug info, qml debugging and profilling, qmake build configuration)
qmake command
C:/Qt/5.12.11/msvc2017/bin/qmake.exe C:\Users\<path_tp_proj_file>.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug" "CONFIG+=force_debug_info" "CONFIG+=separate_debug_info" && C:/Qt/Tools/QtCreator/bin/jom/jom.exe qmake_all
-
@kncy9876 said in Cannot debug shared library:
qmake command
This is to build your app, right?
How did you build the lib? -
@jsulm said in Cannot debug shared library:
@kncy9876 said in Cannot debug shared library:
qmake command
This is to build your app, right?
How did you build the lib?No this is to build the dll. Our app is built using a different compiler/ide totally. Our exe then loads this dll at runtime. The dll is the ui of our application which triggers callbacks to the exe when user clicks.
So to debug our ui I try and attach to the running application but get the message about the dll not being a debug build. -
So is this DLL built with debug information and is the corresponding pdb file (if you use MSVC) visible to the debugger?
-
@kncy9876 said in Cannot debug shared library:
So to debug our ui I try and attach to the running application but get the message about the dll not being a debug build.
Because the dll is NOT build in debug mode. Build it in debug mode if you want to debug it...
-
@jsulm said in Cannot debug shared library:
@kncy9876 said in Cannot debug shared library:
So to debug our ui I try and attach to the running application but get the message about the dll not being a debug build.
Because the dll is NOT build in debug mode. Build it in debug mode if you want to debug it...
I'm sorry if I didnt make it clear, but the dll is built in debug mode. It has the pdb file alongside it. It 100% is built with debug. I can see the difference between release/debug builds.
By the way I am not debugging the application, I am debugging the dll. So using QT to attach to my exe -
@kncy9876 said in Cannot debug shared library:
QT to attach to my
Qt is a library... It can not attach to anything.
-
@Christian-Ehrlicher said in Cannot debug shared library:
@kncy9876 said in Cannot debug shared library:
QT to attach to my
Qt is a library... It can not attach to anything.
Like this
-
You are attaching to the exe and not the dll. If that is not a debug build it is quite plausible to see the warning message. It doesn't mean that it won't work for the dll. (Though I have not experience debugging a dll and I'm not sure if it should work.)
-
This post is deleted!