Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. WM_XBUTTONDOWN not declared in qtwindowsglobal.h
Forum Updated to NodeBB v4.3 + New Features

WM_XBUTTONDOWN not declared in qtwindowsglobal.h

Scheduled Pinned Locked Moved General and Desktop
12 Posts 2 Posters 4.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • QT-static-prgmQ Offline
    QT-static-prgmQ Offline
    QT-static-prgm
    wrote on last edited by
    #1

    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 desktop

    After 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 2

    C:\Qt\Qt_5.3.1_static>@

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAICS it has nothing to do with static building. What version of mingw are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • QT-static-prgmQ Offline
        QT-static-prgmQ Offline
        QT-static-prgm
        wrote on last edited by
        #3

        i'm unsign 4.8.1.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          May I ask why ? IIRC Qt ships with 4.8.2

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • QT-static-prgmQ Offline
            QT-static-prgmQ Offline
            QT-static-prgm
            wrote on last edited by
            #5

            Ähm, because i used the mingw-install GUI and the 4.8.1 was the latest one.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • QT-static-prgmQ Offline
                QT-static-prgmQ Offline
                QT-static-prgm
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  How did you installed it ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • QT-static-prgmQ Offline
                    QT-static-prgmQ Offline
                    QT-static-prgm
                    wrote on last edited by
                    #9

                    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.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Did you do a clean rebuild ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • QT-static-prgmQ Offline
                        QT-static-prgmQ Offline
                        QT-static-prgm
                        wrote on last edited by
                        #11

                        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...\makespec

                        and 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.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          You don't need that one unless you're developing Qt

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved