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.
Qt Code:
  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2013-03-09T10:12:11
  4. #
  5. #-------------------------------------------------QT += serialport
  6. QT += serialport
  7. QT += core
  8. QT -= gui
  9.  
  10. TARGET = serial01
  11. CONFIG += console
  12. CONFIG -= app_bundle
  13.  
  14. TEMPLATE = app
  15.  
  16.  
  17. SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode 

main.cpp
Qt Code:
  1. #include <QCoreApplication>
  2. #include <QDebug>
  3.  
  4. #include <QtSerialPort/qserialport.h>
  5. #include <QtSerialPort/qserialportinfo.h>
  6.  
  7. QT_USE_NAMESPACE_SERIALPORT
  8.  
  9. int main(int argc, char *argv[])
  10. {
  11. QCoreApplication a(argc, argv);
  12.  
  13. // Example use SerialPortInfo
  14. foreach (const SerialPortInfo &info, SerialPortInfo::availablePorts()) {
  15. qDebug() << "Name : " << info.portName();
  16. qDebug() << "Description : " << info.description();
  17. qDebug() << "Manufacturer: " << info.manufacturer();
  18.  
  19. // Example use SerialPort
  20. SerialPort serial;
  21. serial.setPort(info);
  22. if (serial.open(QIODevice::ReadWrite))
  23. serial.close();
  24. }
  25.  
  26. return a.exec();
  27. }
To copy to clipboard, switch view to plain text mode 

There also seeams to be a problem with the QT_USE_NAMESPACE_SERIALPORT

What is missing here?