Qt Creator: Common Errors When Debugg

首先,我还是认为visual studio是这个星球上最牛逼的编译器。

最近转入了qt的怀抱,使用qt creator调试的过程中遇到了一些问题,现在列出来与您分享。

问题1error: cannot open output file debug\test5_5.exe: Permission denied
方法:
任务管理器关掉test5_5.exe进程
问题2:
cannot convert 'qquickitem*' to 'qobject*' in initialization
方法:
包含 include <QtQuick> instead of <QtQuick/QQuickView>or<QQuickView>`
问题3D:\qt_workspace\key_generation\main.cpp:1: error: QApplication: No such file or directory
 #include <QApplication>
方法:
.pro文件中加入
QT += widgets
问题4file:///D:/qt_workspace/build-key_generation-Desktop_Qt_5_5_1_MinGW_32bit-Debug/main.qml:-1 File not found
方法:
component->loadUrl(QUrl("main.qml"));
改为
component->loadUrl(QUrl("qrc:/main.qml"));
问题5:
C:/msys64/mingw64/lib\libSDL2.a(SDL_render_d3d11.o):(.rdata$.refptr.IID_IDXGIDevice1[.refptr.IID_IDXGIDevice1]+0x0): undefined reference to `IID_IDXGIDevice1'
C:/msys64/mingw64/lib\libSDL2.a(SDL_render_d3d11.o):(.rdata$.refptr.IID_ID3D11DeviceContext1[.refptr.IID_ID3D11DeviceContext1]+0x0): undefined reference to `IID_ID3D11DeviceContext1'
C:/msys64/mingw64/lib\libSDL2.a(SDL_render_d3d11.o):(.rdata$.refptr.IID_ID3D11Device1[.refptr.IID_ID3D11Device1]+0x0): undefined reference to `IID_ID3D11Device1'
C:/msys64/mingw64/lib\libSDL2.a(SDL_render_d3d11.o):(.rdata$.refptr.IID_IDXGIFactory2[.refptr.IID_IDXGIFactory2]+0x0): undefined reference to `IID_IDXGIFactory2'
C:/msys64/mingw64/lib\libSDL2.a(SDL_render_d3d11.o):(.rdata$.refptr.IID_ID3D11Texture2D[.refptr.IID_ID3D11Texture2D]+0x0): undefined reference to `IID_ID3D11Texture2D'
collect2.exe: error: ld returned 1 exit status
方法:
add -luuid to to the libs. 主要是注意luuid的路径
问题6:
Cannot retrieve debugging output.
方法:
很有可能你同时开了两个qt creator,其中已经有一个正在调试。
This problem can show up if more than one instance of Qt Creator is active. To fix the issue, simply close all the other instances of Qt Creator and it should work. 

问题7:
SIGSEGV Error when debugging with Qt creator
方法:
最大的可能就是指针造成的问题。比如delet了一个非new的指针。

You get a SIGSEGV if your appliion tries to access memory illegally.

你可能感兴趣的:(debug,qt)