Results 1 to 4 of 4

Thread: Qt with devc++

  1. #1
    Join Date
    Mar 2008
    Location
    Morocco
    Posts
    47
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default Qt with devc++

    peace..
    hi everybody ..
    I just started with Qt library and I have some trouble to execute some applications on devc++..
    I installed qt and create a template for it on devc++... when i complile a simple programme ( hello world )..it gives no error but when i execute (run)..I've the following error> the procedure enry point .... could not be located in the dynamic link library QtCore4.dll
    plz help

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Qt with devc++

    Do you have multiple versions of Qt installed? Which one is in PATH? Which one do you use for compiling your app?
    J-P Nurmi

  3. #3
    Join Date
    Mar 2008
    Location
    Morocco
    Posts
    47
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default Re: Qt with devc++

    Well...Actually I reinstall another version (4.3.4 ...) ..So it work for simple application ( project with only one main.cpp).

    I tried to create a project with 3 files ( file.h ,file.cpp and main.cpp)

    file.h:
    Qt Code:
    1. #ifndef MYDIALOG_H
    2. #define MYDIALOG_H
    3.  
    4. #include <QDialog>
    5.  
    6. class QLabel;
    7. class QCheckBox;
    8. class QTextEdit;
    9. class QLineEdit;
    10.  
    11. class myDialog: public QDialog
    12. {
    13. Q_OBJECT
    14.  
    15. public:
    16. myDialog(QWidget *parent=0);
    17.  
    18. signals:
    19. void findNext(const QString *str,Qt::CaseSensitivity cs);
    20. void findPrevious(const QString *str,Qt::CaseSensitivity cs);
    21.  
    22.  
    23. private slots:
    24. void findClicked();
    25. void enableFindButton(const QString &text);
    26.  
    27. private:
    28. QLabel *lable1;
    29. QLineEdit *lineEdit;
    30. QCheckBox *case1;
    31. QCheckBox *case2;
    32. QPushButton *find;
    33. QPushButton *close;
    34. };
    35.  
    36.  
    37. #endif
    To copy to clipboard, switch view to plain text mode 

    file.cpp ( definitions of member function)
    main ( a simple instance of the class dial)

    ..the errors I get are linker error >>>undefined reference to myDialog::staticMetData..?
    ..
    ..

    I read about Q_Object mecanism ..but I dont really know wht to do ( how to create a moc file??!!)

    plz help
    Last edited by jpn; 7th March 2008 at 05:08. Reason: missing [code] tags

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Qt with devc++

    Make sure file.h is listed in .pro file and always re-run qmake after adding or removing Q_OBJECT macro.
    J-P Nurmi

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.