undefined reference error while building app;

286 Views Asked by At

I'm getting this error while building a BlackBerry project:

../.moc/moc_applicationui.cpp:53: undefined reference to ApplicationUI::copyText(QByteArray)

I went through applicationui.hpp file and I saw the declaration of the copyText function as:

public:
  Q_INVOKABLE
    void copyText(QByteArray text);

I don't understand what's the error?

1

There are 1 best solutions below

0
Roger Leblanc On

You have copyText method declared in hpp but it is not implemented in cpp, just add this to your applicationui.cpp file :

ApplicationUI::copyText(QByteArray text) {
  // Your logic goes here
}