WM_XBUTTONDOWN not declared in qtwindowsglobal.h
-
Can someone please help me with this problem?
I wanted to build Qt 5.3.1 for static linking I used configure -static -platfrom win32-g++ -opengl desktopAfter i fixed a few problems (_off64_t, undef MemoryBarrier, wtypes.h) i still have this problem, but i cannot find a solution in the internet.
I cannot belive that i'm the only one how ever tryed to build Qt, and so the others need to fix this problem, too. Please tell me how you did.
@g++ -c -pipe -fno-keep-inline-dllexport -g -std=c++0x -fno-exceptions -frtti -Wa
ll -Wextra -DUNICODE -DQT_STATIC_BUILD -DQT_NO_CAST_FROM_ASCII -DQT_NO_DIRECTWRITE -DQT_NO_FONTCONFIG -DFT2_BUILD_LIBRARY -DQT_NO_EXCEPTIONS -DQT_STATICPLUGIN -
DQT_PLUGIN -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I"." -I"...
...\3rdparty\wintab" -I"......\3rdparty\freetype\src" -I"......\3rdparty\fr
eetype\include" -I"........\include" -I"........\include\QtPlatformSupport
" -I"........\include\QtPlatformSupport\5.3.1" -I"........\include\QtPlatf
ormSupport\5.3.1\QtPlatformSupport" -I"........\include\QtGui\5.3.1" -I"....
....\include\QtGui\5.3.1\QtGui" -I"........\include\QtCore\5.3.1" -I"....
....\include\QtCore\5.3.1\QtCore" -I"........\include\QtGui" -I"........
include\QtCore" -I".moc\debug" -I"........\mkspecs\win32-g++" -o .obj\debug\q
windowswindow.o qwindowswindow.cpp
In file included from qwindowscontext.h:45:0,
from qwindowswindow.cpp:44:
qtwindowsglobal.h: In function 'QtWindows::WindowsEventType windowsEventType(UIN
T, WPARAM)':
qtwindowsglobal.h:243:25: error: 'WM_XBUTTONDOWN' was not declared in this scope|| (message >= WM_XBUTTONDOWN && message <= WM_XBUTTONDBLCLK)) ^
qtwindowsglobal.h:243:54: error: 'WM_XBUTTONDBLCLK' was not declared in this sco
pe
|| (message >= WM_XBUTTONDOWN && message <= WM_XBUTTONDBLCLK))
^
Makefile.Debug:1665: recipe for target '.obj/debug/qwindowswindow.o' failed
mingw32-make[5]: *** [.obj/debug/qwindowswindow.o] Error 1
mingw32-make[5]: Leaving directory 'C:/Qt/Qt_5.3.1_static/src/plugins/platforms/
windows'
Makefile:38: recipe for target 'debug-all' failed
mingw32-make[4]: *** [debug-all] Error 2
mingw32-make[4]: Leaving directory 'C:/Qt/Qt_5.3.1_static/src/plugins/platforms/
windows'
Makefile:90: recipe for target 'sub-windows-make_first' failed
mingw32-make[3]: *** [sub-windows-make_first] Error 2
mingw32-make[3]: Leaving directory 'C:/Qt/Qt_5.3.1_static/src/plugins/platforms'Makefile:121: recipe for target 'sub-platforms-make_first' failed
mingw32-make[2]: *** [sub-platforms-make_first] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/Qt_5.3.1_static/src/plugins'
Makefile:523: recipe for target 'sub-plugins-make_first' failed
mingw32-make[1]: *** [sub-plugins-make_first] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/Qt_5.3.1_static/src'
Makefile:38: recipe for target 'sub-src' failed
mingw32-make: *** [sub-src] Error 2C:\Qt\Qt_5.3.1_static>@
-
Hi,
AFAICS it has nothing to do with static building. What version of mingw are you using ?
-
i'm unsign 4.8.1.
-
May I ask why ? IIRC Qt ships with 4.8.2
-
Ähm, because i used the mingw-install GUI and the 4.8.1 was the latest one.
-
Then I would recommend installing the MinGW Qt package which provides a MinGW that is known to work correctly with it, and do the static build with that one. Also, don't forget to remove the other one, you may encounter problems with multiple MinGW parallel installs.
-
ok i now installed the latest version of mingw. But now i get this error when running the configure command
Generating Makefiles...
Cannot read C:/Qt/Qt_5_3_1_static/qtbase/mkspecs/qmake.conf: No such file or dir
ectory
Could not read qmake configuration file C:/Qt/Qt_5_3_1_static/qtbase/mkspecs/qma
ke.conf.
Error processing project file: C:\Qt\Qt_5_3_1_static\qtbase\qtbase.pro
Qmake failed, return code 3 -
How did you installed it ?
-
downloaded here http://sourceforge.net/projects/mingw-w64/files/latest/download?source=files
than i choose 4.9.1 (ups it should be 4.8.2 right?)
Architecture i686
Threads win32
Exception dwarf
Build revision 0==EDIT==
i uninstalled MInGW, installed 4.8.2 i686 win32 dwarf 4
And than i noticed that there was something wrong with my enviroment variables.Ok so that was fixed. But now i get this:
@
collect2.exe: error: ld returned 1 exit status
Makefile.Release:84: recipe for target 'C:\Qt\Qt_531_static\qtbase\bin\qml.exe'
failed
mingw32-make[4]: *** [C:\Qt\Qt_531_static\qtbase\bin\qml.exe] Error 1
mingw32-make[4]: Leaving directory 'C:/Qt/Qt_531_static/qtdeclarative/tools/qml'Makefile:34: recipe for target 'release' failed
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory 'C:/Qt/Qt_531_static/qtdeclarative/tools/qml'Makefile:94: recipe for target 'sub-qml-make_first' failed
mingw32-make[2]: *** [sub-qml-make_first] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/Qt_531_static/qtdeclarative/tools'
Makefile:66: recipe for target 'sub-tools-make_first' failed
mingw32-make[1]: *** [sub-tools-make_first] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/Qt_531_static/qtdeclarative'
Makefile:215: recipe for target 'module-qtdeclarative-make_first' failed
mingw32-make: *** [module-qtdeclarative-make_first] Error 2
@I'm sure that the last problems are caused because the 1st one. I searched for collect2.exe in the whole Qt directory, but there is no such exe. And there is also no qml.exe.
I hope you can help me with this problem.
-
Did you do a clean rebuild ?
-
Yes i even redownloaded the source ;)
But when i installed MinGW it decides to go to C:\Programme (x86)\Mingw..
So there was a space in the path (Programme (x86)). I reinstalled to C:\MinGW... and now it works.
And for older Versions the enviroment variables needed to be
QTDIR = C:\Qt\Qt_5.3.1_static
QTMAKESPEC = C:\Qt\Qt_5.3.1_static...\makespecand now they need to be:
PATH = C:\Qt\Qt_5.3.1_static\qtbase\bin;C:\Qt\Qt_5.3.1_static\gnuwin32\bin;C:\Python26;C:\MinGW_4_9_1\mingw32\bin;%PATH%
QMAKESPEC = win32-g++Just one question what is c:\qt\qt-5\qtrepotools\bin; good for?? i found it here
http://qt-project.org/doc/qt-5/windows-building.html
but there is no such folder in my source. And Qt was also build without this path. -
You don't need that one unless you're developing Qt