Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Unable to compile QSerialDevice on Qt 4.7.4
QtWS25 Last Chance

Unable to compile QSerialDevice on Qt 4.7.4

Scheduled Pinned Locked Moved 3rd Party Software
16 Posts 5 Posters 9.4k Views
  • 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.
  • J Offline
    J Offline
    joriot
    wrote on last edited by
    #1

    I've recently updated my Qt installation to the latest Qt SDK 1.1.4, with Qt 4.7.4 libs, running on Windows 7. However, I'm not able to compile QSerialDevice in this environment. Specifically, the QSerialDevice source seems to contain references to include files that have either been moved or replaced: for example, 'serialportengine_p_win.h' contains '#include <QtCore/private/qwineventnotifier_p.h>', which does not exist in my environment at least.

    Previously I've had it working on Qt 4.7.2, so it seems that either my fresh Qt SDK installation is incomplete, or the QSerialDevice code is not quite up-to-date anymore with recent changes in the Qt libs?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      welcome to devnet

      Which version of QSerialDevice are you using ?
      "See also this post":http://developer.qt.nokia.com/forums/viewthread/11634/#67246

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • J Offline
        J Offline
        joriot
        wrote on last edited by
        #3

        Saw that thread, and tried version 2.0, but the same line of code is there on gitorius, line 17 in: https://gitorious.org/qserialdevice/qserialdevice/blobs/2.0/src/serialportengine_p_win.h

        Edit: updated link.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          I have also the newest qt sdk installed, but I do not use yet. I could find the includes for the msvc 2005 compiler and QtCore does not have the private folder as required.

          I was checking the archive of the commercial version and it is there as it was in previous versions.

          BTW Your link is broken. You need to add a blank before '>'

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kuzulis
            Qt Champions 2020
            wrote on last edited by
            #5

            2 joriot,

            read "this":http://developer.qt.nokia.com/forums/viewreply/68136/

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kuzulis
              Qt Champions 2020
              wrote on last edited by
              #6

              In a future release Qt5, a class QWinEventNotifier make as public. Judging from the Qt commit logs.

              1 Reply Last reply
              0
              • J Offline
                J Offline
                joriot
                wrote on last edited by
                #7

                I've now tried adding the older Qt 4.7.2 libs to my installation using the SDK 1.1.4 Maintenance tool, but did not get any 'private' folder under QtCore for the include files for that version either.

                Previously, I had just downloaded the Qt 4.7.2 libs (and Qt Developer), and done an offline installation. At that time, 'QtCore/private' include files were there, and everything worked fine. When upgrading, I deleted my old Qt installation, and I decided to try a fresh installation of the complete SDK 1.1.4, using the online installer.

                So, it now looks like there would be some kind of a problem with this SDK 1.1.4 online installer, for some reason it does not install the 'QtCore/private' include files?

                Edit: Thanks 'kuzulis' for your comments, seems I wrote this at the same time while you were posting your comments.

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  joriot
                  wrote on last edited by
                  #8

                  OK, thanks to all your input so far, I now got it compiling using mingw at least. There are actually 2 files that are needed from the source tree to patch up the SDK installation:

                  Qt/4.7.4/mingw/include/QtCore/private/qwineventnotifier_p.h
                  Qt/4.7.4/mingw/src/corelib/kernel/qwineventnotifier_p.h

                  Still didn't work using msvc2005 with these 2 patches alone, but I'll look closer at that later, I haven't tried that setup earlier at all.

                  And the fact that these folders/files are missing in the SDK distribution should then be considered an intentional "feature", and not a "problem"? :)

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    joriot
                    wrote on last edited by
                    #9

                    Looking closer at QSerialDevice version 2.0, I can't seem to find the SerialDeviceEnumerator class anymore, which was there in version 0.4.0. Has it been removed?

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      vezprog
                      wrote on last edited by
                      #10

                      I believe I had this issue before as well. I downloaded the sources from the website and copied in the missing includes, and also I had to add to my environment variable PATH to include the sources folder and the bin folder. Although, ive never used QSerialDevice, but I use QExtSerialPort quite frequently (non alpha version because it is broken).

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kuzulis
                        Qt Champions 2020
                        wrote on last edited by
                        #11

                        [quote]
                        Qt/4.7.4/mingw/include/QtCore/private/qwineventnotifier_p.h
                        Qt/4.7.4/mingw/src/corelib/kernel/qwineventnotifier_p.h
                        [/quote]

                        If you set QtSDK, then you do not need to duplicate.
                        You should copy this file in only one place, for example:
                        /QtSDK/Desktop/Qt/4.7.4/msvc2008/include/QtCore/private/qwineventnotifier_p.h
                        If you use the installation for the assembly with MSVS2008

                        Or copy to:
                        /QtSDK/Desktop/Qt/4.7.4/minGW/include/QtCore/private/qwineventnotifier_p.h
                        If you use the installation for the assembly with MinGw.

                        If not mistaken, I am writing in my memory. :)

                        [quote]
                        And the fact that these folders/files are missing in the SDK distribution should then be considered an intentional “feature”, and not a “problem”? :)
                        [/quote]
                        Yes, this "feature". It's okay if the established QtSDK not folders /private, etc. along these routes. You just create them yourself.

                        [quote]
                        Looking closer at QSerialDevice version 2.0, I can’t seem to find the SerialDeviceEnumerator class anymore, which was there in version 0.4.0. Has it been removed?
                        [/quote]
                        Yes, it was removed. Now, instead use SerialPortInfo. Class SerialDeviceEnumerator was complicated, it was impossible to implement it across all platforms. It is also now reduced many of the methods that get information about the device, because Not all platforms have are analogues. Although, in the future, this situation may change after integration in Qt.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          david.luggen
                          wrote on last edited by
                          #12

                          I tried to build the qserialdevice master Library with Qt 4.8 on a Win7 64-bit and got quiet the same problem:

                          @c:\QtSDK\Desktop\Qt\4.8.0\mingw\include\QtCore\private\qwineventnotifier_p.h:1: Fehler:../../../src/corelib/kernel/qwineventnotifier_p.h: No such file or directory@

                          I've done everything written in this and the other post about building the qserialdevice Library but without success! Does anyone has an idea what I may have overlooked?

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            joriot
                            wrote on last edited by
                            #13

                            From your error message, it looks like you only have copied the file 'qwineventnotifier_p.h' from the 'include' tree folder in the source distribution? This file only contains a link to the file with the actual content in the 'src' tree folder, and is not enough. I guess the thread above with instructions is a bit messy at this stage, so let's see if I can put a simple summary of how I got this working on 4.7.4, and how it probably still should work on 4.8.

                            From the Qt source distribution, take the file:

                            \QtSDK\Desktop\Qt\4.8.0\mingw\src\corelib\kernel\qwineventnotifier_p.h

                            And put it in:

                            \QtSDK\Desktop\Qt\4.8.0\mingw\include\QtCore\private\qwineventnotifier_p.h

                            Notice the difference in the path under 'mingw'. It os a bit of a hack in my view, but should work.

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              kuzulis
                              Qt Champions 2020
                              wrote on last edited by
                              #14

                              luggi,
                              what do you not understand?

                              Take it from Qt 4.8.0 source .../src/corelib/kernel/qwineventnotifier_p.h and copy it to SDK c:\QtSDK\Desktop\Qt\4.8.0\mingw\include\QtCore\private\qwineventnotifier_p.h

                              1 Reply Last reply
                              0
                              • K Offline
                                K Offline
                                kuzulis
                                Qt Champions 2020
                                wrote on last edited by
                                #15

                                2 joriot,

                                Yes, yes, exactly! You're ahead me. :)

                                2 luggi,

                                bq. I tried to build the qserialdevice master Library

                                No, do not take master - take a branch "2.0 ":http://gitorious.org/qserialdevice/qserialdevice/archive-tarball/2.0

                                1 Reply Last reply
                                0
                                • D Offline
                                  D Offline
                                  david.luggen
                                  wrote on last edited by
                                  #16

                                  That's it. I'm also working with branch 2.0 now. Thx very much!

                                  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