Test01.exe is unable to run
-
Hey All,
i am new to Qt.
my steps are here for making my first "helloworld App" in fresh installed Windows XP Sp3 32b with latest updates.
-
install -QT- Qt 4.8.4 with default folder:C:\Qt\4.8.4 (I don't have QtCreator installed)
-
install mingw as well. C:\MinGW
-
add windows environmental variables.
@QTDIR = C:\Qt\4.8.4PATH = %QTDIR%\bin;C:\MinGW\bin;%PATH%
QMAKE = win32-g++@
Code main.cpp,
@#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.show();
return app.exec();
}@then run the commands in Command promopt.
C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test01>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.7.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.7.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --disable-build-poststage1-
with-cxx --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.7.2 (GCC)C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test01>qmake -v
QMake version 2.01a
Using Qt version 4.8.4 in C:\Qt\4.8.4\libC:\Documents and Settings\Administrator\Desktop\Qt-Projects\test01>make -v
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test01>qmake -project
C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test01>qmake
C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test01>make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Documents and Settings/Administrator/Des
ktop/Qt-Projects/test01'
g++ -c -pipe -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_LARGE
FILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -
DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAI
N -I"c:\Qt\4.8.4\include\QtCore" -I"c:\Qt\4.8.4\include\QtGui" -I"c:\Qt\4.8.4\in
clude" -I"." -I"c:\Qt\4.8.4\include\ActiveQt" -I"debug" -I"c:\Qt\4.8.4\mkspecs\w
in32-g++" -o debug\main.o main.cpp
g++ -mthreads -Wl,-subsystem,windows -o debug\test01.exe debug/main.o -L"c:\Qt
4.8.4\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory 'C:/Documents and Settings/Administrator/Desk
top/Qt-Projects/test01'C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test01>
looks everything is working fine without errors.
but when I try to run the test01.exe under debug folder,
the error message:
"test01.exe has encoutered a problem and needs to close................."i can see an event log like this
Event Type: Error
Event Source: Application Error
Event Category: None
Event ID: 1000
Date: 2/1/2013
Time: 10:37:52 PM
User: N/A
Computer: QQ-0AE4989DC926
Description:
Faulting application test01.exe, version 0.0.0.0, faulting module test01.exe, version 0.0.0.0, fault address 0x00001fc8.For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 41 70 70 6c 69 63 61 74 Applicat
0008: 69 6f 6e 20 46 61 69 6c ion Fail
0010: 75 72 65 20 20 74 65 73 ure tes
0018: 74 30 31 2e 65 78 65 20 t01.exe
0020: 30 2e 30 2e 30 2e 30 20 0.0.0.0
0028: 69 6e 20 74 65 73 74 30 in test0
0030: 31 2e 65 78 65 20 30 2e 1.exe 0.
0038: 30 2e 30 2e 30 20 61 74 0.0.0 at
0040: 20 6f 66 66 73 65 74 20 offset
0048: 30 30 30 30 31 66 63 38 00001fc8
0050: 0d 0a ..is there anyboday who has experience on this? please guide me
thank you very much.
Frank
-
-
actually i followed this document, http://sector.ynet.sk/qt4-tutorial/preparations.html. and i wanna to check my windows settings and Qt configurations are working fine for building Qt windows apps.
-
thanks Stuk,
i have qt creator installed and created a qt gui application with default configuration, when i click debug button, the error was shown as below,
Starting C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test02-build-Desktop-Debug\debug\test02.exe...
The program has unexpectedly finished.
C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test02-build-Desktop-Debug\debug\test02.exe exited with code -1073741819Starting C:\Documents and Settings\Administrator\Desktop\Qt-Projects\test02-build-Desktop-Debug\debug\test02.exe...
and system error window.
i checked the error message relate to qtcore4.dll. i copied the error log file from user's temp folder.
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\43cd_appcompat.txt@<?xml version="1.0" encoding="UTF-16"?>
<DATABASE>
<EXE NAME="test02.exe" FILTER="GRABMI_FILTER_PRIVACY">
<MATCHING_FILE NAME="test02.exe" SIZE="490158" CHECKSUM="0x75A7F972" MODULE_TYPE="WIN32" PE_CHECKSUM="0x804E1" LINKER_VERSION="0x10000" LINK_DATE="02/03/2013 08:23:19" UPTO_LINK_DATE="02/03/2013 08:23:19" />
</EXE>
<EXE NAME="QtCored4.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
<MATCHING_FILE NAME="QtCored4.dll" SIZE="77097645" CHECKSUM="0x875BF337" BIN_FILE_VERSION="4.8.4.0" BIN_PRODUCT_VERSION="4.8.4.0" FILE_DESCRIPTION="C++ application development framework." COMPANY_NAME="Digia Plc and/or its subsidiary(-ies)" PRODUCT_NAME="Qt4" FILE_VERSION="4.8.4.0" ORIGINAL_FILENAME="QtCored4.dll" LEGAL_COPYRIGHT="Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies)." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x49895FA" LINKER_VERSION="0x10000" UPTO_BIN_FILE_VERSION="4.8.4.0" UPTO_BIN_PRODUCT_VERSION="4.8.4.0" LINK_DATE="02/02/2013 14:23:44" UPTO_LINK_DATE="02/02/2013 14:23:44" VER_LANGUAGE="English (United States) [0x409]" />
</EXE>
<EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
<MATCHING_FILE NAME="kernel32.dll" SIZE="989696" CHECKSUM="0x7D737C09" BIN_FILE_VERSION="5.1.2600.5512" BIN_PRODUCT_VERSION="5.1.2600.5512" PRODUCT_VERSION="5.1.2600.5512" FILE_DESCRIPTION="Windows NT BASE API Client DLL" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System" FILE_VERSION="5.1.2600.5512 (xpsp.080413-2111)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xF44A2" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.5512" UPTO_BIN_PRODUCT_VERSION="5.1.2600.5512" LINK_DATE="04/14/2008 00:11:24" UPTO_LINK_DATE="04/14/2008 00:11:24" VER_LANGUAGE="English (United States) [0x409]" />
</EXE>
</DATABASE>@please help to check the root cause.
i have googled a lot, but unsure the answers.
thanks!
Frank.
-
[quote author="stuk" date="1359805853"]You made the code? I don't know if you can add a pushbutton without a 'form' in that way! Generally you have to create a gui project and put a button inside the QMainWindow[/quote]
Sure you can. Every Qt widget can be a top level widget, including QPushButton.
-
i have created new gui app with qt creator and have default setting.
is there any step i have missed?[quote author="Andre" date="1359977209"]
[quote author="stuk" date="1359805853"]You made the code? I don't know if you can add a pushbutton without a 'form' in that way! Generally you have to create a gui project and put a button inside the QMainWindow[/quote]Sure you can. Every Qt widget can be a top level widget, including QPushButton. [/quote]