Can't select GDB in Qt Creator on Windows

2019-02-25 18:30发布

I've selected GDB instead of CDB as the debugger in Qt Creator on Windows:

enter image description here

But when I start debugging a program, it fails with this error:

Unable to create a debugger engine of the type "No engine"

It works if I select CDB from the Combo. Why am I getting this error, and how do I fix it? I assume I do have GDB installed if it's in the combo box, right?

Edit: I see where the problem might lie, but still no idea how do I fix it:

enter image description here

[Open the above image in a new tab to see in full resolution.] It says "Not recognized" for GDB.

Edit 2: I just remembered that I'm using the MSVC compiler, and the Qt libs are compiled for MSVC:

enter image description here

Maybe that's the reason? Although GDB should be able to debug any executable, not just ones generated by gcc, so I'm not sure if it's relevant.

1条回答
一夜七次
2楼-- · 2019-02-25 18:57

You can't use GDB with MSVC-compiled code. It seems you're mixing the two.

CDB goes with Visual C++. GDB goes with MinGW(-w64).

查看更多
登录 后发表回答