March 16, 2012

justdad justdad
Lab Rat
20 posts

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

  1. /*
  2.   A device has been discovered via IOKit.
  3.   Create a QextPortInfo if possible, and emit the signal indicating that we've found it.
  4. */
  5.  
  6.  
  7. void QextSerialEnumeratorPrivate::onDeviceDiscoveredOSX( io_object_t service )
  8. {
  9.     Q_Q(QextSerialEnumeratorPrivate);
  10.     QextPortInfo info;
  11.     info.vendorID = 0;
  12.     info.productID = 0;
  13.     if( getServiceDetailsOSX( service, &info ) )
  14.         Q_EMIT q->deviceDiscovered( info );
  15. }

The error is

  1. F/Users/ken/QtSDK/Desktop/Qt/474/gcc/lib -o debug/qextserialenumerator_osx.o ../../qextserialport_12/src/qextserialenumerator_osx.cpp
  2. ../../qextserialport_12/src/qextserialenumerator_osx.cpp: In member function 'void QextSerialEnumeratorPrivate::onDeviceDiscoveredOSX(io_object_t)':
  3. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:199: error: cannot convert 'QextSerialEnumerator*' to 'QextSerialEnumeratorPrivate* const' in initialization
  4. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:204: error: 'class QextSerialEnumeratorPrivate' has no member named 'deviceDiscovered'
  5. ../../qextserialport_12/src/qextserialenumerator_osx.cpp: In member function 'void QextSerialEnumeratorPrivate::onDeviceTerminatedOSX(io_object_t)':
  6. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:213: error: cannot convert 'QextSerialEnumerator*' to 'QextSerialEnumeratorPrivate* const' in initialization
  7. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:218: error: 'class QextSerialEnumeratorPrivate' has no member named 'deviceRemoved'
  8. ../../qextserialport_12/src/qextserialenumerator_osx.cpp: At global scope:
  9. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:227: warning: unused parameter 'setup'
  10. make[2]: *** [debug/qextserialenumerator_osx.o] Error 1
  11. make[2]: Leaving directory `/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib'
  12. make[1]: *** [debug-all] Error 2
  13. make: *** [sub-buildlib-make_default-ordered] Error 2
  14. make[1]: Leaving directory `/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib'
  15. make: Leaving directory `/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug'
  16. The process "/usr/bin/make" exited with code 2.

6 replies

March 17, 2012

koahnig koahnig
Area 51 Engineer
2892 posts

Unfortunately I cannot help you with the compiling problems on mac. However, I wonder if you have came across the option of QSerialDevice [qt-project.org] already. There are some more threads refering to QSerialDevice [qt-project.org] Apparently, it does support mac already.

March 20, 2012

1+1=2 1+1=2
Hobby Entomologist
638 posts

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

March 20, 2012

justdad justdad
Lab Rat
20 posts

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.

  1. Running build steps for project qextserialport...
  2. Configuration unchanged, skipping qmake step.
  3. Starting: "/usr/bin/make" -w
  4. make: Entering directory `/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug'
  5. cd buildlib/ && /usr/bin/make -f Makefile
  6. make[1]: Entering directory `/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib'
  7. /usr/bin/make -f Makefile.Debug all
  8. make[2]: Entering directory `/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib'
  9. 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
  10. ../../qextserialport_12/src/qextserialenumerator_osx.cpp: In member function 'void QextSerialEnumeratorPrivate::onDeviceDiscoveredOSX(io_object_t)':
  11. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:199: error: cannot convert 'QextSerialEnumerator*' to 'QextSerialEnumeratorPrivate* const' in initialization
  12. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:204: error: 'class QextSerialEnumeratorPrivate' has no member named 'deviceDiscovered'
  13. ../../qextserialport_12/src/qextserialenumerator_osx.cpp: In member function 'void QextSerialEnumeratorPrivate::onDeviceTerminatedOSX(io_object_t)':
  14. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:213: error: cannot convert 'QextSerialEnumerator*' to 'QextSerialEnumeratorPrivate* const' in initialization
  15. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:218: error: 'class QextSerialEnumeratorPrivate' has no member named 'deviceRemoved'
  16. ../../qextserialport_12/src/qextserialenumerator_osx.cpp: At global scope:
  17. ../../qextserialport_12/src/qextserialenumerator_osx.cpp:227: warning: unused parameter 'setup'
  18. make[2]: *** [debug/qextserialenumerator_osx.o] Error 1
  19. make[2]: Leaving directory `/Users/ken/Documents/qextserialport-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/buildlib'
  20. make[1]: *** [debug-all] Error 2
  21. make[1]: Leaving directory

March 20, 2012

1+1=2 1+1=2
Hobby Entomologist
638 posts

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

  1. void QextSerialEnumeratorPrivate::onDeviceDiscoveredOSX( io_object_t service )
  2. {
  3.     Q_Q(QextSerialEnumerator);
  4.     QextPortInfo info;
  5.     info.vendorID = 0;

latest version of qextserialport can be found from here

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

Hope this help you.

Debao

March 20, 2012

justdad justdad
Lab Rat
20 posts

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

March 20, 2012

justdad justdad
Lab Rat
20 posts

Ok, I think I fixed it. I ended up deleting all of my old version of this project and all of the build directories. Once I did this, it compiled. Now need to test the ability to run.

Ken

 
  ‹‹ QGLViewer - Depthbuffer z distance      draw on top of xoverlay using qt ››

You must log in to post a reply. Not a member yet? Register here!