Hello everyone!

I'm a student in electical engineering, having some troubles with C++ / Qt Programming. For a students project, I've to program a simple app on Sailfish OS (Device: Jolla 1, QtBluetooth 5.2) which listens to UDP datagrams (that works well) and hands them over to a Bluetooth SPP connection (rfcomm protocol). It's mainly just a control software for a RGBW lamp, which gets connected via BT.

UDP and Bluetooth are in the same project, accessing the same include-space.
While my UDP connection works flawlessly, the Bluetooth code causes the linker to stop and hand out the error:
\home\mersdk\share\LightCubeServer\src\btconn.cpp: 14: Error: undefined reference to `QBluetoothServer::QBluetoothServer(QBluetoothServ iceInfo::Protocol, QObject*)'
After spending two weekends of reading documentations, I've no clue on what to do anymore. I even attached the corresponding include files to the project, which didn't change anything.

The Header file btconn.h:
Qt Code:
  1. #include <QtCore/QObject>
  2. #include <QtBluetooth/QBluetoothServer>
  3.  
  4. QT_FORWARD_DECLARE_CLASS(QBluetoothServer)
  5.  
  6. class BtConn : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit BtConn(QObject *parent = 0); // Constructor
  11. void startServer(const QBluetoothAddress &localAdapter = QBluetoothAddress()); // Method used for starting the server
  12. private:
  13. QBluetoothServer *rfcommServer; // Variable for Server-Instance
  14. };
To copy to clipboard, switch view to plain text mode 

and the Code File btconn.cpp:

Qt Code:
  1. #include "btconn.h"
  2.  
  3. BtConn::BtConn(QObject *parent) : QObject(parent)
  4. {
  5. // Constructor won't do anything
  6. }
  7.  
  8. // Start the Bluetooth Server
  9. void BtConn::startServer(const QBluetoothAddress& localAdapter)
  10. {
  11. if (rfcommServer)
  12. return;
  13.  
  14. rfcommServer = new QBluetoothServer(QBluetoothServiceInfo::RfcommProtocol, this);
  15.  
  16. }
To copy to clipboard, switch view to plain text mode 


I really hope that someone has an idea on how to solve that problem.

Best regards

PS: English isn't my main language - sorry for typos and grammar mistakes.