Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error in compilation
Qt 6.11 is out! See what's new in the release blog

Error in compilation

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shady50
    wrote on last edited by
    #1

    Hello, I'm learning Windows GUI programming with Qt but I encounter a problem when I compile my project in the latest version of Qt (Qt 5.1.1 vs2012 64bits). The compilation produces these 3 errors:

    /////////////////////////////////////////////////////

    moc_finddialog.obj:-1: erreur : LNK2019: symbole externe non résolu "public: void __cdecl FindDialog::findClicked(void)" (?findClicked@FindDialog@@QEAAXXZ) référencé dans la fonction "private: static void __cdecl FindDialog::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@FindDialog@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)

    moc_finddialog.obj:-1: erreur : LNK2019: symbole externe non résolu "public: void __cdecl FindDialog::enableFindButton(class QString const &)" (?enableFindButton@FindDialog@@QEAAXAEBVQString@@@Z) référencé dans la fonction "private: static void __cdecl FindDialog::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@FindDialog@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z)

    debug\find.exe:-1: erreur : LNK1120: 2 externes non résolus

    ///////////////////////////////////////////////////////////
    Here is the header file code:
    *#ifndef FINDDIALOG_H
    #define FINDDIALOG_H

    #include <QObject>
    #include <QDialog>

    class QLabel;
    class QPushButton;
    class QLineEdit;
    class QCheckBox;
    class QString;

    namespace Ui {
    class FindDialog;
    }

    class FindDialog : public QDialog
    {
    Q_OBJECT

    public:
    explicit FindDialog(QWidget *parent = 0);
    ~FindDialog();

    public slots:
    void findClicked();
    void enableFindButton(const QString &text);

    signals:
    void findPrevious(const QString &str, Qt::CaseSensitivity cs);
    void findNext(const QString &str, Qt::CaseSensitivity cs);

    private:
    Ui::FindDialog *ui;
    };

    #endif // FINDDIALOG_H
    *
    ////////////

    Please help me to resolve this problem.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      t3685
      wrote on last edited by
      #2

      Have you implemented @void findClicked();
      void enableFindButton(const QString &text);@

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shady50
        wrote on last edited by
        #3

        Thanks t3685, I have implemented the 2 slots now and compilation run well.
        Thank you much

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved