PDA

View Full Version : Reimplement QWidget::x11Event(XEvent*) question



x-bar
28th September 2009, 00:31
This is my first post here.
I have installed and configured Qt on my system and have been trying over the last month to get some compilable code to work.
I have a single default window with no added controls. When I run a clean compile and build in debug (tried this in release too to same effect) I get this:

Configuration unchanged, skipping QMake step.
Starting: c:\MinGW\bin\mingw32-make.exe
c:/MinGW/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/Derek/Desktop/Qt/myQtTest01'
c:/Qt/4.5.2/bin/uic.exe mainwindow.ui -o ui_mainwindow.h
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.5.2/include/QtCore' -I'c:/Qt/4.5.2/include/QtGui' -I'c:/Qt/4.5.2/include' -I'c:/Qt/4.5.2/include/ActiveQt' -I'debug' -I'.' -I'c:/Qt/4.5.2/mkspecs/win32-g++' -o debug/mainwindow.o mainwindow.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug/myQtTest01.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -L'c:/Qt/4.5.2/lib' -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4
mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/Derek/Desktop/Qt/myQtTest01'
debug/moc_mainwindow.o(.rdata$_ZTV10MainWindow[vtable for MainWindow]+0xb0): In function `ZSt17__verify_groupingPKcjRKSs':
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.tcc:2509: undefined reference to `QWidget::x11Event(_XEvent*)' <== this is what I do not know how to referene or re/implement
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [debug/myQtTest01.exe] Error 1
c:\MinGW\bin\mingw32-make.exe : *** [debug] Error 2
Exited with code 2.
Error while building project myQtTest01
When executing build step 'Make'

From the little reading I have done on this board the QWidget::x11Event(_XEvent*) is key to app run. Can anyone give me a heads up on what I might be missing.

Win XP Home SP 2. using Make c:\MinGW\bin\mingw32-make.exe

TIA

wysota
28th September 2009, 01:36
x11Event() is not available on win32. I see that you are using Cygwin (for what purpose?) but you'd need Qt built for Cygwin to have a chance to have x11Event() defined (although I doubt it'd be there).

x-bar
28th September 2009, 11:45
Ah. Thanks Wysota. I am new to Qt and to C++. I am using this as a learning tool and for a few projects for fun. I am coming to this from 'c' background and little GUI.

Cygwin is there I guess because it is. I tried to follow the install instructions to the letter and did not pay much attention to the result. I had assumed things might actually work. I have MSFT Studio on my system too. How do I get Qt to use the compiler from that? Is the process fairly straight forward?

At least now I know where my problem lays. THanks again. x.