Unable to compile qextserialport on Mac OS10.6
-
I am trying to compile qextserialport on a Mac OSX 10.6 and I keep getting the following errors. Any ideas on what I need to do to fix this? I use this code on Windows with no problems, but the mac version is killing me.
Thanks in advance,
Ken
The code that it does not seem to like is
@/*
A device has been discovered via IOKit.
Create a QextPortInfo if possible, and emit the signal indicating that we've found it.
*/void QextSerialEnumeratorPrivate::onDeviceDiscoveredOSX( io_object_t service )
{
Q_Q(QextSerialEnumeratorPrivate);
QextPortInfo info;
info.vendorID = 0;
info.productID = 0;
if( getServiceDetailsOSX( service, &info ) )
Q_EMIT q->deviceDiscovered( info );
}@The error is
@F/Users/ken/QtSDK/Desktop/Qt/474/gcc/lib -o debug/qextserialenumerator_osx.o ../../qextserialport_12/src/qextserialenumerator_osx.cpp
../../qextserialport_12/src/qextserialenumerator_osx.cpp: In member function 'void QextSerialEnumeratorPrivate::onDeviceDiscoveredOSX(io_object_t)':
../../qextserialport_12/src/qextserialenumerator_osx.cpp:199: error: cannot convert 'QextSerialEnumerator*' to 'QextSerialEnumeratorPrivate* const' in initialization
../../qextserialport_12/src/qextserialenumerator_osx.cpp:204: error: 'class QextSerialEnumeratorPrivate' has no member named 'deviceDiscovered'
../../qextserialport_12/src/qextserialenumerator_osx.cpp: In member function 'void QextSerialEnumeratorPrivate::onDeviceTerminatedOSX(io_object_t)':
../../qextserialport_12/src/qextserialenumerator_osx.cpp:213: error: cannot convert 'QextSerialEnumerator*' to 'QextSerialEnumeratorPrivate* const' in initialization
../../qextserialport_12/src/qextserialenumerator_osx.cpp:218: error: 'class QextSerialEnumeratorPrivate' has no member named 'deviceRemoved'
../../qextserialport_12/src/qextserialenumerator_osx.cpp: At global scope:
../../qextserialport_12/src/qextserialenumerator_osx.cpp:227: warning: unused parameter 'setup'
make[2]: *** [debug/qextserialenumerator_osx.o] Error 1
make[2]: Leaving directory/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib' make[1]: *** [debug-all] Error 2 make: *** [sub-buildlib-make_default-ordered] Error 2 make[1]: Leaving directory
/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib'
make: Leaving directory `/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug'
The process "/usr/bin/make" exited with code 2.@ -
Unfortunately I cannot help you with the compiling problems on mac. However, I wonder if you have came across the option of "QSerialDevice":http://qt-project.org/forums/viewthread/11634/#67246 already. There are some more threads refering to "QSerialDevice":http://qt-project.org/search/tag/qserialdevice Apparently, it does support mac already.
-
Hi Ken,
QextSerialPort 1.2beta1 has been released. And this bug has been fix. Hope this is useful for you.
http://code.google.com/p/qextserialport/wiki/QextSerialPort_1_2_Beta1
-
I just downloaed and tested this code. Still an issue. I am loading the project into creater and compiling QextSerialPort.pro. This resulted in the same errors. I am able to compile the library though.
@Running build steps for project qextserialport...
Configuration unchanged, skipping qmake step.
Starting: "/usr/bin/make" -w
make: Entering directory/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug' cd buildlib/ && /usr/bin/make -f Makefile make[1]: Entering directory
/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib'
/usr/bin/make -f Makefile.Debug all
make[2]: Entering directory/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib' g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -fPIC -DQT_GUI_LIB -DQT_CORE_LIB -I../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/macx-g++ -I../../qextserialport_12/buildlib -I../../../QtSDK/Desktop/Qt/474/gcc/lib/QtCore.framework/Versions/4/Headers -I../../../QtSDK/Desktop/Qt/474/gcc/include/QtCore -I../../../QtSDK/Desktop/Qt/474/gcc/lib/QtGui.framework/Versions/4/Headers -I../../../QtSDK/Desktop/Qt/474/gcc/include/QtGui -I../../../QtSDK/Desktop/Qt/474/gcc/include -I../../qextserialport_12/src -Idebug -I../../qextserialport_12/buildlib -I. -F/Users/ken/QtSDK/Desktop/Qt/474/gcc/lib -o debug/qextserialenumerator_osx.o ../../qextserialport_12/src/qextserialenumerator_osx.cpp ../../qextserialport_12/src/qextserialenumerator_osx.cpp: In member function 'void QextSerialEnumeratorPrivate::onDeviceDiscoveredOSX(io_object_t)': ../../qextserialport_12/src/qextserialenumerator_osx.cpp:199: error: cannot convert 'QextSerialEnumerator*' to 'QextSerialEnumeratorPrivate* const' in initialization ../../qextserialport_12/src/qextserialenumerator_osx.cpp:204: error: 'class QextSerialEnumeratorPrivate' has no member named 'deviceDiscovered' ../../qextserialport_12/src/qextserialenumerator_osx.cpp: In member function 'void QextSerialEnumeratorPrivate::onDeviceTerminatedOSX(io_object_t)': ../../qextserialport_12/src/qextserialenumerator_osx.cpp:213: error: cannot convert 'QextSerialEnumerator*' to 'QextSerialEnumeratorPrivate* const' in initialization ../../qextserialport_12/src/qextserialenumerator_osx.cpp:218: error: 'class QextSerialEnumeratorPrivate' has no member named 'deviceRemoved' ../../qextserialport_12/src/qextserialenumerator_osx.cpp: At global scope: ../../qextserialport_12/src/qextserialenumerator_osx.cpp:227: warning: unused parameter 'setup' make[2]: *** [debug/qextserialenumerator_osx.o] Error 1 make[2]: Leaving directory
/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib'
make[1]: *** [debug-all] Error 2
make[1]: Leaving directory @ -
Hi Ken,
Seems that you still using a pre-release version of QextSerailPort, maybe it is from http://code.google.com/r/dbzhang800-qextserialport/ ?.
you can compare the contents of your function (qextserialenumerator_osx.cpp : Line 213) with following code
@
void QextSerialEnumeratorPrivate::onDeviceDiscoveredOSX( io_object_t service )
{
Q_Q(QextSerialEnumerator);
QextPortInfo info;
info.vendorID = 0;
@latest version of qextserialport can be found from here
http://code.google.com/p/qextserialport/
Hope this help you.
Debao
-
I just redownloaded and recompiled this code from 1.2beta1 and get the same error. However the code for "onDeviceDiscoveredOSX" starts on line 198 for me and not 213 as you suggest in your reply.
I dont know if this is anything, but when I look at my code in qestserialenumerator.h and qextserialenumerator_p.h I do not see any construcotr defined that has QextWrialEnumeratorPrivate as a parameter. But I have never used this private methodolgy so this is probably nothing.
ken