[SOLVED] QT Serial Communication with Beaglebone
-
first of all check qt doc link "check qt doc link...":http://qt-project.org/wiki/QtSerialPort and re-extract to get a clean dir of QtSerialPort
because what I see here from your log
looks like duplicated qmake or you moc version isn't the same as qmake
@
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:14:2: error: #error “This file was generated using the moc from 4.6.3. It”
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:15:2: error: #error “cannot be used with the include files from this version of Qt.”
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:16:2:
@
check your moc version
@
/opt/qt/bin/moc -v
@
Also your qtopia using old qt flags
@
WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/share/qtopia/mkspecs/common/g++.conf:44: Variable QMAKE_RPATH is deprecated; use QMAKE_LFLAGS_RPATH instead.
WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-
@ -
Qt Meta Object Compiler version 63 (Qt 4.8.2)
Would it help if I uninstall qt4-emebedded ?
I think it has worked this time.
So I downloaded qt-qtserialport once more and extracted it.
Then :
@cd ~/Downloads/qt-qtserialport
/opt/qt/bin/qmake ~/Downloads/qt-qtserialport/qtserialport.pro
make
sudo make install
@
and it finished without errors. I'm gonna check how it's going in QTCreator. -
Would it help if I uninstall qt4-emebedded ?
I don't think so , If you upgraded your qt version to 4.8 so your qt4-emebedded gonna upgraded too[quote author="Tilapia21" date="1391776804"]
I think it has worked this time.
So I downloaded qt-qtserialport once more and extracted it.
Then :
@cd ~/Downloads/qt-qtserialport
/opt/qt/bin/qmake ~/Downloads/qt-qtserialport/qtserialport.pro
make
sudo make install
@
and it finished without errors. I'm gonna check how it's going in QTCreator.[/quote]Here was my guess you used qmake version 4.6.3 then after you upgrade
you used qmake version 4.8.2 without clean the old moc files and MakeFileso I think everything gonna work fine with you this time
-
Sorry, I forgot to mention I had done it too.
@QT += core gui
CONFIG += serialport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgetsTARGET = QTTest2
target.files = QTTest2
target.path = /home/rootINSTALLS += target
TEMPLATE = appSOURCES += main.cpp
mainwindow.cppHEADERS += mainwindow.h
FORMS += mainwindow.ui@
-
-
Ok, just a last problem then I think I'll be ready to fly on my own.
I compiled the "terminal" example and it was displayed on the beaglebone screen. But I wanted to change the mainWindow resolution cause the example was really small and I should have made sth wrong cause now I get this error :
16:06:32: Running steps for project terminal...
16:06:32: Configuration unchanged, skipping qmake step.
16:06:32: Starting: "/usr/bin/make"
arm-angstrom-linux-gnueabi-g++ -Wl,-rpath-link,/opt/qt/lib -o terminal main.o mainwindow.o settingsdialog.o console.o moc_mainwindow.o moc_settingsdialog.o moc_console.o qrc_terminal.o -L/home/julian/Downloads/qt-qtserialport/src/serialport -L/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/lib -lglib-2.0 -lQtSerialPort -lQtGui -lQtCore -lpthread
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lQtGui
collect2: ld returned 1 exit status
make: *** [terminal] Error 1
16:06:32: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project terminal (kit: BeagleboneKit)
When executing step 'Make'
16:06:32: Elapsed time: 00:00. -
@
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lQtGui
collect2: ld returned 1 exit status
@
the linker can't find QtGui because in follow directory you should have
QT library and I don't why qt qmake didn't even provide the path of lib maybe you should recall qmake
@
/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib
@