[Qt-interest] Is this a Qt bug or MinGW bug?
1+1=2
dbzhang800 at gmail.com
Sun Aug 1 16:18:31 CEST 2010
I found that :
if i use libgcc_s_dw2-1.dll which provied by Mingw or by Qt4.6 to
replace the dll which located in the bin directory of Qt4.7, the error
will disppear.
But I still can not understand why one working and the other can not
when use the dll provied by Qt4.7.
Debao
On Sun, Aug 1, 2010 at 3:57 PM, 1+1=2 <dbzhang800 at gmail.com> wrote:
> Hello everyone,
>
> I encountered a strange problem. I use Mingw Version Qt4.7beta2 to
> write a very simple procedure. When I run the generated xxx.exe file,
> a message appears: “ the application failed to i ntialize properly
> error code (0xc000005) ”
>
> Finally, I found the problem: If I use "-LE:\***" as link flag, error
> box will appear when i try to run the xxx.exe, but it work well when i
> use "-Le:\***" as link flags.
>
> I can reproduce this problem under xp and vista.
>
> The test case I used is very simple:
>
> // main.cpp
> #include <QtCore/QCoreApplication>
> #include <QtCore/QDebug>
> int main(int argc, char ** argv)
> {
> QCoreApplication app(argc, argv);
> qDebug()<<"Hello World!";
> return 0;
> }
>
> To investigate this problem, we directly use make instead of qmake of
> cmake, The "Makefile" file is simple too:
>
> CXX = g++
> DEFINES = -DQT_DLL -DQT_CORE_LIB
> INCPATH = -I"e:\Qt\4.7.0-beta2\include"
> LIBS = -L"e:\Qt\4.7.0-beta2\lib"
> main: main.o
> $(CXX) -o main main.o $(LIBS) -lQtCore4
> main.o: main.cpp
> $(CXX) -c $(INCPATH) -o main.o main.cpp -Wall -DUNICODE
>
> You can change the path in INCPATH and LIBS to your Qt dir, then run
> make, a program called main.exe will be generated. your can run it.
>
> Then you can the Drive letter from lowercase to uppercase, After
> remove the main.o and main.exe, run make against. One new program
> called main.exe will be generated.
> When I try to run this .exe file, i get an error message box.
>
> I cannot reproduce the problem if I use mingw and c++ without Qt, So I
> dont know is this an bug of Mingw or Qt.
>
> The Mingw version(which was installed when i installed QtCreator 2.0):
>
> Target: mingw32
> Configured with: ../gcc-4.4.0/configure
> --enable-languages=c,ada,c++,fortran,java,objc,obj-c++
> --disable-sjlj-exceptions --enable-shared --enable-libgcj
> --enable-libgomp --with-dwarf2 --disable-win32-registry
> --enable-libstdcxx-debug --enable-version-specific-runtime-libs
> --prefix=/mingw --with-gmp=/mingw/src/gmp/root
> --with-mpfr=/mingw/src/mpfr/root --build=mingw32
> Thread model: win32
> gcc version 4.4.0 (GCC)
>
> Anyone can help me?
>
> Yours sincerely,
>
> Debao.
>
More information about the Qt-interest-old
mailing list