Search code examples
visual-studioqtdebuggingvisual-studio-2005qt4.8

Debugging Qt with Visual Studio


How is it possible to debug Qt 4.8 in Visual Studio 2005? Building release does work but if i try to debug, I always get this message:

This application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log.

How can I fix that? Thank you!

Update

I rebuild Qt for Visual Studio 2005 using configure -platform win32-msvc2005 and jom instead of nmake (damn thats fast) and now get following Errorcode:

The application was unable to start correctly (0xc0150002).Click OK to close the application.

Update2

How can I fix the DLLs and error messages?

Dependency Walker:

Missing DLLs

  • MSVCP90D.DLL
  • MSVCR90D.DLL
  • API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
  • API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
  • API-MS-WIN-CORE-WINRT-L1-1-0.DLL
  • API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
  • API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
  • API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
  • DCOMP.DLL
  • IESHIMS.DLL

Error messages

Error: The Side-by-Side configuration information for "c:\qt\4.8.6\bin\QTGUID4.DLL" contains errors.

Error: At least one required implicit or forwarded dependency was not found.

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.

Error: Modules with different CPU types were found.

Warning: At least one delay-load dependency module was not found.

Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

Update 3

I now started from scratch:

  1. Install qt-opensource-windows-x86-vs2008-4.8.6.exe (building from qt-everywhere-opensource-src-4.8.6.zip would even cause release mode not to work anymore, cannot find QtGuid4.lib and QtGui4.lib, but with building from installed Qt it finds the libs)
  2. Install qt-vs-addin-1.1.11-opensource.exe
  3. jom distclean "Error: File Makefile doesn't exist exit."
  4. jom confclean "Error: File Makefile doesn't exist exit."
  5. configure -platform win32-msvc2005
  6. jom

Last few output lines of jom:

C:\Qt\4.8.6>jom

[...]

qimageiohandler.cpp
qimagereader.cpp
qimagewriter.cpp
qpaintengine_pic.cpp
qkeymapper_win.cpp
qiconloader.cpp
Code wird generiert...
Code wird generiert...
qimage.cpp

jom: C:\Qt\4.8.6\src\gui\Makefile.Release [tmp\obj\release_shared\qguiplatformpl
ugin.obj] Error 2
        cl -c -FIqt_gui_pch.h -Yuqt_gui_pch.h -Fptmp\obj\release_shared\QtGui_pc
h.pch -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -w34100 -w34189 -GR -EHsc -DQT_SHA
RED -DQT_THREAD_SUPPORT -DUNICODE -DWIN32 -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMES
PACE -DQT_MAKEDLL -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -
DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -D_USE_MATH_DEFINES -DQT_NO_DIRECTDRAW -D
QT_USE_BUNDLED_LIBPNG -DPNG_NO_ASSEMBLER_CODE -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_O
PENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYL
E_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQT_NO_EGL -DQ_INTERNAL_QAPP_SRC -DQT_NO_DIRE
CTWRITE -DQT_DLL -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_
HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DNDEBUG -I"..\..\include\QtCore" -I"..
\..\include" -I"..\..\include\QtGui" -I"tmp\rcc\debug_shared" -I"tmp" -I"..\3rdp
arty\wintab" -I"image" -I"..\3rdparty\libpng" -I"..\3rdparty\zlib" -I"..\3rdpart
y\zlib" -I"..\3rdparty\harfbuzz\src" -I"dialogs" -I"..\..\include\ActiveQt" -I"t
mp\moc\release_shared" -I"." -I"..\..\mkspecs\win32-msvc2005" -Fotmp\obj\release
_shared\ @C:\Users\fpieske\AppData\Local\Temp\qpicture.obj.5884.19719.jom

qpicture.cpp
qpictureformatplugin.cpp
qpixmap.cpp
qpixmapdata.cpp
Code wird generiert...
Code wird generiert...
jom: C:\Qt\4.8.6\src\gui\Makefile [release-all] Error 2
jom: C:\Qt\4.8.6\Makefile [sub-gui-make_default-ordered] Error 2

C:\Qt\4.8.6>

Solution

  • I got it! Was about to quit trying to debug with Visual Studio and use Qt Creator instead. While reading how to configure Qt Creator i read about installing Windows SDK. Well debugging with Qt Creator still does not work (Unknown debugger type "No Engine") but installing Windows SDK solved my debugging problem in Visual Studio!