error: Unknown module(s) in QT: serialport
Hi
I'm trying to build the example on this wiki: http://qt-project.org/wiki/QtSerialPort
I'm using Qt5 and Debian Wheezy.
After building and installing the libraries (i think), when i try to build the application e get:
error: Unknown module(s) in QT: serialport
My .pro is like this.
Code:
#-------------------------------------------------
#
# Project created by QtCreator 2013-03-09T10:12:11
#
#-------------------------------------------------QT += serialport
QT += serialport
QT += core
QT -= gui
TARGET = serial01
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
main.cpp
Code:
#include <QCoreApplication>
#include <QDebug>
#include <QtSerialPort/qserialport.h>
#include <QtSerialPort/qserialportinfo.h>
QT_USE_NAMESPACE_SERIALPORT
int main(int argc, char *argv[])
{
// Example use SerialPortInfo
foreach (const SerialPortInfo &info, SerialPortInfo::availablePorts()) {
qDebug() << "Name : " << info.portName();
qDebug() << "Description : " << info.description();
qDebug() << "Manufacturer: " << info.manufacturer();
// Example use SerialPort
SerialPort serial;
serial.setPort(info);
serial.close();
}
return a.exec();
}
There also seeams to be a problem with the QT_USE_NAMESPACE_SERIALPORT
What is missing here?
Re: error: Unknown module(s) in QT: serialport
How did you install the library?
Re: error: Unknown module(s) in QT: serialport
#1 - downloaded the code from http://qt.gitorious.org/qt/qtserialp...tarball/master
#2 - uncompressed it to ~/Downloads/qt-qtserialport
#3 - created a buil location ~/Downloads/qt-qtserialportbuild$
#4 - In #3 folder executed
qmake ../qt-qtserialport/qtserialport.pro
make
su -c "make install"
Looking better ...there seems to be no .so library! Where showld it be?
Added after 7 minutes:
And i have:
Code:
$ ls -l /usr/include/Q*
total 28
-rw-r--r-- 1 root root 25 Mar 9 10:09 QSerialPort
-rw-r--r-- 1 root root 2392 Mar 2 17:47 qserialportglobal.h
-rw-r--r-- 1 root root 8438 Mar 2 17:47 qserialport.h
-rw-r--r-- 1 root root 29 Mar 9 10:09 QSerialPortInfo
-rw-r--r-- 1 root root 3266 Mar 2 17:47 qserialportinfo.h
Re: error: Unknown module(s) in QT: serialport
From what I see it should be in the same directory as your Qt libraries.
Re: error: Unknown module(s) in QT: serialport
The examples in the "example" folder build correctly, and i was able to do basic serial communication.
The errors i mentioned above must be related to Qt version!