Any (self-compiled) Qt app crashes.
Michael Goffioul
kde-cygwin@mail.kde.org
Wed, 04 Dec 2002 15:10:03 +0100
I'm in the process of porting a Qt app to Windows/cygwin (it already
runs under Linux and plain Windows). My setup is:
Windows2K
cygwin-1.3.17-1
binutils-20020516 (from kde-cygwin site, "ld --version" reports
2.11.92 20011001)
gcc-2.95.3-10
I tried to compile and run an application as simple as the following:
testqt.pro:
CONFIG += debug
TARGET = testqt
SOURCES = main.cpp
main.cpp:
#include <qapplication.h>
#include <qpushbutton.h>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QPushButton *btn = new QPushButton("Click me", 0);
QObject::connect(btn, SIGNAL(clicked()), &app, SLOT(quit()));
app.setMainWidget(btn);
btn->show();
return app.exec();
}
Application is compile using "qmake" (QMAKESPEC set to win32-g++) and
"make" (CXXFLAGS set to "-fvtable-thunks", LFLAGS set to
"-Wl,--enable-auto-import").
This test application always crashes on the line "btn->show()". The
backtrace is the following:
#0 0x00000000 in ?? ()
#1 0x00401227 in main (argc=1, argv=0x10572b18) at main.cpp:10
#2 0x610072e8 in _libkernel32_a_iname ()
#3 0x610075cd in _libkernel32_a_iname ()
#4 0x0040516e in cygwin_crt0 () at main.cpp:12
#5 0x0040103c in mainCRTStartup ()
#6 0x77e97d08 in _libkernel32_a_iname ()
Applications coming with Qt package (designer, qtconfig) runs without
any problem. The application I'm trying to port also crashes at weird
places, but it must be a more fundamental problem as this little
test app above crashes as well.
Any help or advice would be appreciated.
Thanks.
Michael.
--
------------------------------------------------------------------
Michael Goffioul IMEC-DESICS-MIRA
e-mail: goffioul@imec.be (Mixed-Signal and RF Applications)
Tel: +32/16/28-8510 Kapeldreef, 75
Fax: +32/16/28-1515 3001 HEVERLEE, BELGIUM
------------------------------------------------------------------