Unable to compile QSerialDevice on Qt 4.7.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 '>'
-
2 joriot,
read "this":http://developer.qt.nokia.com/forums/viewreply/68136/
-
In a future release Qt5, a class QWinEventNotifier make as public. Judging from the Qt commit logs.
-
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.
-
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.hStill 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"? :)
-
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).
-
[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 MSVS2008Or 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. -
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?
-
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.
-
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
-
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
-
That's it. I'm also working with branch 2.0 now. Thx very much!