PDA

View Full Version : Qt 5.0.2 + MSVC 2012 + gnu Make = unable to start correctly (0xc000007b)



YiWanYuan
12th June 2013, 08:38
Hello all,

I was under environment as title with a sample code like below.


#include <QApplication>
#include <QWidget>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget window;

window.resize(250, 150);
window.setWindowTitle("Simple example");
window.show();

return app.exec();
}

Every time I ran the application I got error: Unable to start application (0xc000007b). I have been googling for a long time but still cannot succeed. Can anybody give me a hand? Thanks in advance.

My Makefile is follows:



PROGRAM = main.exe

QTDIR=C:\Qt\Qt5.0.2\5.0.2\msvc2012_64

INCLUDEDIRS = -I$(QTDIR)\include
INCLUDEDIRS += -I$(QTDIR)\include\QtGui
INCLUDEDIRS += -I$(QTDIR)\include\QtCore
INCLUDEDIRS += -I$(QTDIR)\include\QtWidgets

QTLIBS += "$(QTDIR)\lib\Qt5core.lib" \
"$(QTDIR)\lib\qt5gui.lib" \
"$(QTDIR)\lib\qtmain.lib" \
"$(QTDIR)\lib\qt5network.lib" \
"$(QTDIR)\lib\qt5help.lib" \
"$(QTDIR)\lib\qt5sql.lib" \
"$(QTDIR)\lib\Qt5CLucene.lib" \
"$(QTDIR)\lib\Qt5Widgets.lib"

QTWINLIBS = "kernel32.lib" "gdi32.lib" "comdlg32.lib" \
"ole32.lib" "oleaut32.lib" "uuid.lib" \
"imm32.lib" "winmm.lib" "ws2_32.lib" "winspool.lib"

DLL = "$(QTDIR)\bin\icudt49.dll" \
"$(QTDIR)\bin\icuin49.dll" \
"$(QTDIR)\bin\icuuc49.dll" \
"$(QTDIR)\bin\Qt5Core.dll" \
"$(QTDIR)\bin\Qt5Gui.dll" \
"$(QTDIR)\bin\Qt5Widgets.dll"

LIBDIRS =
LIBS =

CPPSOURCES = main.cpp
CPPOBJECTS = $(CPPSOURCES:.cpp=.obj)
CPPOPT = /EHsc -nologo -W3 -WX -DSTRICT -D_CRT_NONSTDC_NO_DEPRECATE -MD -I.
CPPOPT += -DWIN64 -D_CRT_SECURE_NO_DEPRECATE -wd4244 -wd4267
CPPFLAGS = $(INCLUDEDIRS) $(CPPOPT)
CPP = cl.exe

LD=link
LINKFLAGS = /SUBSYSTEM:WINDOWS -nologo
SYLIBS= ws2_32.lib advapi32.lib user32.lib resutils.lib clusapi.lib \
shell32.lib

all: $(PROGRAM)

CP=cp

$(PROGRAM): $(CPPOBJECTS)
$(LD) $(LINKFLAGS) $(LIBDIRS) $(LIBS) $(QTLIBS) $(QTWINLIBS) $(SYLIBS) $^ -out:$@
$(CP) $(QTDIR)\bin\icudt49.dll icudt49.dll
$(CP) $(QTDIR)\bin\icuin49.dll icuin49.dll
$(CP) $(QTDIR)\bin\icuuc49.dll icuuc49.dll
$(CP) $(QTDIR)\bin\Qt5Core.dll Qt5Core.dll
$(CP) $(QTDIR)\bin\Qt5Gui.dll Qt5Gui.dll
$(CP) $(QTDIR)\bin\Qt5Widgets.dll Qt5Widgets.dll
$(CP) $(QTDIR)\bin\libGLESv2.dll libGLESv2.dll

main.obj: main.cpp
$(CPP) $(CPPFLAGS) /c main.cpp

clean:
$(RM) $(CPPOBJECTS)
$(RM) $(PROGRAM)
$(RM) *.dll

Lesiok
12th June 2013, 10:06
The answer is here (http://lmgtfy.com/?q=Unable+to+start+application+0xc000007b)

YiWanYuan
17th July 2013, 10:26
Like I said, I already googled a lot. Can anybody else help me? Thanks!