Mr-Ntic / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

compile 1.2rc on WINXP with qt4.7.4 #154

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of QextSerialPort are you using?
1.2rc

What steps will reproduce the problem?
1. download 1.2rc
2. open project in qtcreator 2.3.1  based on qt4.7.4
3. compile

What is the expected output? What do you see instead?

error in compiling

mingw32-make[1]: Leaving directory 
`E:/data/dev/qextserialport/qextserialport-1.2rc'
src/qextserialenumerator_win.cpp: In member function 'bool 
QextSerialEnumeratorPrivate::setUpNotifications_sys(bool)':
src/qextserialenumerator_win.cpp:258: error: 
'DEVICE_NOTIFY_ALL_INTERFACE_CLASSES' was not declared in this scope

What version of the product are you using? On what operating system?
trying compiling 1.2rc on WinXP with QT4.7.4

Please provide any additional information below.

I'd like to use the qextserialenumerator function that send signals
on USB device connection/disconnection
that you seems to provide with this version...

big problem for me is that we use USB/serial converter
to dialog with some electronics boards
and application crash if the USB is unplugged
I hope I could close the port and solve this problem using events send by 
qextserialenumerator 

but it seems that the DEVICE_NOTIFY_ALL_INTERFACE_CLASSES
and even DEVICE_NOTIFY_WINDOW_HANDLE
are not defined because WINVER < 0x500  (in my "winuser.h" )

is it possible to get this event on WINXP ?

kind regards
herve.

Original issue reported on code.google.com by hb.i...@gmail.com on 11 Jan 2013 at 8:23

GoogleCodeExporter commented 8 years ago
Hi,

IMO, It should work with MinGW 4.4 and Qt4.7 under XP.

You can find line follow line in file qextserialenumerator.h line 55

  #define WINVER 0x0500

If it still doesn't work, we need more information from you.

Regards

Original comment by dbzhang...@gmail.com on 13 Jan 2013 at 1:10

GoogleCodeExporter commented 8 years ago
Confirmed on my box:

src\qextserialenumerator_win.cpp: In member function 'bool 
QextSerialEnumeratorPrivate::setUpNotifications_sys(bool)':
src\qextserialenumerator_win.cpp:258:47: error: 
'DEVICE_NOTIFY_ALL_INTERFACE_CLASSES' was not declared in this scope

Windows 7 (Home Premium, build 7601, SP1)
Qt 4.8.4

Original comment by vsla...@gmail.com on 13 Jan 2013 at 8:50

GoogleCodeExporter commented 8 years ago
Hi all,

Thanks for your feedback. Please give a try to the latest source.

https://qextserialport.googlecode.com/archive/49c9b474ade4b631a5232082c16c27eb54
baf5c8.zip

The patch information can be found:
https://code.google.com/p/qextserialport/source/detail?r=6dd548dc2de8defae39cd10
342d313317cbde736

Hope this is useful for you.

Regards

Original comment by dbzhang...@gmail.com on 14 Jan 2013 at 7:26

GoogleCodeExporter commented 8 years ago
Yea, now it works. Able to compile and use the library without issues. Thank 
you very much for your work.

Original comment by vsla...@gmail.com on 14 Jan 2013 at 9:00

GoogleCodeExporter commented 8 years ago
hi,

it's OK now...
now trying to use the library

Original comment by hb.i...@gmail.com on 14 Jan 2013 at 9:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hello all. 

I have the same problem when i compile:

..\qextserialport-1.2rc\src\qextserialenumerator_win.cpp: In member function 
'bool QextSerialEnumeratorPrivate::setUpNotifications_sys(bool)':
..\qextserialport-1.2rc\src\qextserialenumerator_win.cpp:258: error: 
'DEVICE_NOTIFY_ALL_INTERFACE_CLASSES' was not declared in this scope

I'm in windows 7 64 bits
Qtsdk 
and i compile on qt 4.7.4.

i try the latest source but not result.

Thx

Original comment by anaconda...@hotmail.com on 15 Jan 2013 at 6:37

GoogleCodeExporter commented 8 years ago
Hi, Please open the file qextserialenumerator_p.h, replace the 0x0500 with 
0x0501, then it will work. Meaning of WINVER can be found in 

https://code.google.com/p/qextserialport/wiki/MinGW_and_WINVER

Original comment by dbzhang...@gmail.com on 17 Jan 2013 at 2:46

GoogleCodeExporter commented 8 years ago
Hi, It works after replace all 500 to 501.
Another problem is that g++ can not find QtCore/private/qwineventnotifier_p.h.
The error log as bellow:
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT 
-DQEXTSERIALPORT_BUILD_SHARED -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX 
-DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 
-DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN 
-I'c:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtCore' 
-I'c:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtGui' 
-I'c:/QtSDK/Desktop/Qt/4.8.1/mingw/include' -I'.' 
-I'c:/QtSDK/Desktop/Qt/4.8.1/mingw/include/ActiveQt' -I'debug' 
-I'c:/QtSDK/Desktop/Qt/4.8.1/mingw/mkspecs/win32-g++' -o 
debug/qextserialport_win.o qextserialport_win.cpp
mingw32-make.exe[1]: Leaving directory 
`D:/qextserialport-49c9b474ade4/qextserialport-49c9b474ade4/src/extserialport'
qextserialport_win.cpp:43:50: error: QtCore/private/qwineventnotifier_p.h: No 
such file or directory

To solve this problem, I add C:\QtSDK\QtSources\4.8.1\include in to 
CPLUS_INCLUDE_PATH in the project setting. But it is urgly. Is there any better 
idea?

Thank you!

Original comment by Abel78D...@gmail.com on 19 Jan 2013 at 12:34

GoogleCodeExporter commented 8 years ago
Hi Abel78Deng,

Yes, it's a known bug of QtSDK of Qt4. and this SDK doesn't maintaned by 
Qt-Project any more.

You can download the latest Qt4.8.X and QtCreator manually instead of QtSDK.

more information can be found in

http://code.google.com/p/qextserialport/wiki/qwineventnotifier_p_h

Original comment by dbzhang...@gmail.com on 20 Jan 2013 at 3:23