I am using Qt 5. I need the serial class, I tried adding += serialport, but it fails. anyone knows which serial class is most suitable for serial communications (better be an interface class) as well as instructions to set it up in
Linux ?
I am using Qt 5. I need the serial class, I tried adding += serialport, but it fails. anyone knows which serial class is most suitable for serial communications (better be an interface class) as well as instructions to set it up in
Linux ?
What happens?I am using Qt 5. I need the serial class, I tried adding += serialport, but it fails.
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
Give more info.
[telepathist mode]
If you use QtSerialPort, then after building need to install library (maybe required superuser privileges for installation). See more info on WIKI!
[/telepathist mode]
And what? You really scoff at us?
At such approach you won't receive any answers from us (from me).
I replied to Santosh question, as I was not sure if this module already exists in qt5 or shall installed as a seperate library. And... next time please make sure you are implying to the correct matter when you accuse members.
anyway,
My problem is with /usr/bin/moc-qt4, I already added /usr/bin/qt4 to the environment variable. but I cannot find anything called moc-qt4 in the system. I have qt 5 installed, but at we need qt4-qmake for libqtserial, I downloaded the package.
Qt Code:
# make cd src/ && make -f Makefile make[1]: Entering directory `/home/saman/5.0.1/serialPort src/qtserialport/src' cd serialport/ && make -f Makefile make[2]: Entering directory `/home/saman/5.0.1/serialPort src/qtserialport/src/serialport' /usr/bin/moc-qt4 -DQT_BUILD_SERIALPORT_LIB -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -I/include -I/include/QtSerialPort -I. qserialport.h -o moc_qserialport.cpp make[2]: /usr/bin/moc-qt4: Command not found make[2]: *** [moc_qserialport.cpp] Error 127 make[2]: Leaving directory `/home/saman/5.0.1/serialPort src/qtserialport/src/serialport' make[1]: *** [sub-serialport-make_default] Error 2 make[1]: Leaving directory `/home/saman/5.0.1/serialPort src/qtserialport/src' make: *** [sub-src-make_default-ordered] Error 2To copy to clipboard, switch view to plain text mode
Last edited by saman_artorious; 24th April 2013 at 15:18.
lib-qt4-dev was missed!
I cannot make, it cannot identify qtSerialPortInfo library.
Qt Code:
main.cpp:(.text.startup+0x5e): undefined reference to `QSerialPortInfo::availablePorts()' main.cpp:(.text.startup+0x10f): undefined reference to `QSerialPortInfo::isBusy() const' main.cpp:(.text.startup+0x16b): undefined reference to `QSerialPortInfo::hasProductIdentifier() const' main.cpp:(.text.startup+0x1bb): undefined reference to `QSerialPortInfo::hasVendorIdentifier() const' main.cpp:(.text.startup+0x212): undefined reference to `QSerialPortInfo::manufacturer() const' main.cpp:(.text.startup+0x24a): undefined reference to `QSerialPortInfo::description() const' main.cpp:(.text.startup+0x282): undefined reference to `QSerialPortInfo::systemLocation() const' main.cpp:(.text.startup+0x2ba): undefined reference to `QSerialPortInfo::portName() const' main.cpp:(.text.startup+0x644): undefined reference to `QSerialPortInfo::productIdentifier() const' main.cpp:(.text.startup+0x674): undefined reference to `QSerialPortInfo::vendorIdentifier() const'To copy to clipboard, switch view to plain text mode
why this happens? the QserialPortInfo.so file is already inside the src directory. I can also include it in qt application. but make fails!
Last edited by saman_artorious; 24th April 2013 at 15:32.
See my post #3 above.
that is not relevant to the question I asked anymore.
to run the program, I forgot about the make error. I added the qserialport and qserialportinfo .so libraries to my current project. This way I also would not receive the Makefile error when I add serialport to config+=.
is that a good idea?
And I am not familiar with Qextserial class. I know that qserialport is created by developers and does not have much support. But, in my case if it supports threads (that it does) might suffice. what do you say?
Last edited by saman_artorious; 24th April 2013 at 16:42.
You wrong, it is important!that is not relevant to the question I asked anymore.
You do everything wrong. Re-read again and again attentively Wiki.I added the qserialport and qserialportinfo .so libraries to my current project. This way I also would not receive the Makefile error when I add serialport to config+=.
is that a good idea?
I'm too.And I am not familiar with Qextserial class.
I didn't understand you, about what qserialport there is a speech?I know that qserialport is created by developers and does not have much support.
I don't understand you.But, in my case if it supports threads (that it does) might suffice. what do you say?
PS:
You jump from one subject on other subject of your topic. First you write that you compile for Qt5,
next you write about problems with MOC from Qt4 and etc. It is difficult to me to watch a course of your
thoughts. You mixed everything in a heap.
Unclear that you want to make, etc.
UPD: If you use QtSerialPort - that all exhaustive information on compilation, installation and use of library read in WIKI.
I don't understand that isn't clear for you...
Bookmarks