Solved How to add new module ?
-
Dear @SGaist ,
Do you mean the content of "qt5/qtbase/include" ?
In this folder, I don't see "QTSerialPort" or anything related to serialport folder.Is there anything wrong ?
-
@Hiloshi According to the log you posted it should be in /home/hiloshi/rpi/rasp-pi-rootfs/usr/local/qt5pi/include/QtSerialPort
-
Inside the folder, there are:
hiloshi@ubuntu64:~/rpi/rasp-pi-rootfs/usr/local/qt5pi/include/QtSerialPort$ ls 5.8.0 QSerialPortInfo QtSerialPortVersion QSerialPort qserialportinfo.h qtserialportversion.h qserialportglobal.h QtSerialPort qserialport.h QtSerialPortDepends
Inside the 5.8.0, there are:
hiloshi@ubuntu64:~/rpi/rasp-pi-rootfs/usr/local/qt5pi/include/QtSerialPort/5.8.0/QtSerialPort/private$ ls qserialportinfo_p.h qserialport_p.h qtudev_p.h
The above data are in the host side raspbian-jessie.img(mount as rasp-pi-rootfs folder).
Does it mean install successful ?
-
Looks like it yes.
Just to be sure, you are are sure you are using the correct qmake for your project ?
-
Dear @SGaist ,
I think there are something wrong on the way I create project.
I import example project from:
~/rpi/qt5/qtserialport/examples/serialport/terminal
and try build and run --> It is working ~~~
But then I try to create project again, it still show:
Project ERROR: Unknown module(s) in QT: serialport
The way I create project is:
- select Qt Widgets Application
- input project name
- Select Kit (Raspberry Pi)
- Choose base class "QMainWindow"
- Add serialport to the end of "QT += core gui " on pro file
- Build
I compare the pro file of two project, I cannot see the mistake.
I upload the project: https://www.dropbox.com/s/fn85bcptzl2pa9k/serialport_test.rar?dl=0
Inside the rar, "terminal3" is working project, "terminal" is not working.Any suggestion is appreciate.
Thanks,
-
What do you mean by importing ?
Take a look at header of the Makefile of the two projects, the qmake line used for each is pretty different.
-
Dear @SGaist ,
Sorry, it should be "Open Project" not import.
I may find the reason that cause this issue:
If I put my project into below folder, then build is OK:
~/rpi/qt5/qtserialport/examples/serialport/terminal/
If I put project on my original workspace, compiler will fail:
~/rpi/QT5Projects/
So I feel I may not include correct path into project.
I go through the options on qt creator, unfortunately I didn't find the place to add path.How should I do to fix it ?
-
Can you try from the command line directly ?
-
Dear @SGaist ,
I don't familiar with command line operation, but I will check some document and try.
Do you suspect something wrong with QT Creator ?
Thanks,
-
@SGaist said in How to add new module ?:
Just to be sure, you are are sure you are using the correct qmake for your project ?
I think you are correct, I use the wrong qmake.
My original setting about "qmake location"(in Options->Build&Run->QtVersion) is
~/rpi/qt5/qtbase/bin/
but when I build qbase, I use:
./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$(which arm-linux-gnueabihf-gcc | sed 's/.\{3\}$//') -sysroot $RPIIMG -opensource -confirm-license -optimized-qmake -reduce-exports -release -no-qml-debug -make libs -make examples -prefix /usr/local/qt5pi -hostprefix $RPIQT
the -hotprefix is $RPIQT, this location is:
~/rpi/qt5pi/bin/
So I should use ~/rpi/qt5pi/bin/ .
Can you try from the command line directly ?
I found this by using command line:
- $RPIQT/bin/qmake .
- make
I see no error message so I goback to check qmake location and find this error.
Thank you very much.
-
So you have it working now ?
-
Dear @SGaist ,
Yes, It works fine.