Results 1 to 4 of 4

Thread: [QT] I can't debug my applications

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    13
    Qt products
    Qt4
    Platforms
    Windows

    Arrow [QT] I can't debug my applications

    Hello guys, I'm new here. I hope you can help me.

    I'm using code::blocks with QT and MinGW installed on Windows Xp.

    I've done a new QT4 project and specified the QT folder.

    The c++ code is ok, because I can compile by terminal the release and it works.

    I get a lot of errors building and running the debug: it doesn't link the QT libraries. How I can specify the right place where to pick them to codeblock?

    Thank you, C.

    p.s.

    CODE:

    Qt Code:
    1. #include <QApplication>
    2. #include <QFont>
    3. #include <QPushButton>
    4. #include <QWidget>
    5.  
    6. class MyWidget : public QWidget
    7. {
    8. public:
    9. MyWidget(QWidget *parent = 0);
    10. };
    11. MyWidget::MyWidget(QWidget *parent)
    12. : QWidget(parent)
    13. {
    14. setFixedSize(200, 120);
    15.  
    16. QPushButton *quit = new QPushButton(tr("Quit"), this);
    17. quit->setGeometry(62, 40, 75, 30);
    18. quit->setFont(QFont("Times", 18, QFont::Bold));
    19.  
    20. connect(quit, SIGNAL(clicked()), qApp, SLOT(quit()));
    21. }
    22. int main(int argc, char *argv[])
    23. {
    24. QApplication app(argc, argv);
    25. MyWidget widget;
    26. widget.show();
    27. return app.exec();
    28. }
    To copy to clipboard, switch view to plain text mode 
    ERROR:

    C:\Projects\uno\Ciao.cc|1|QApplication: No such file or directory|
    C:\Projects\uno\Ciao.cc|2|QFont: No such file or directory|
    C:\Projects\uno\Ciao.cc|3|QPushButton: No such file or directory|
    C:\Projects\uno\Ciao.cc|4|QWidget: No such file or directory|
    C:\Projects\uno\Ciao.cc|7|error: expected class-name before '{' token|
    C:\Projects\uno\Ciao.cc|9|error: expected `)' before '*' token|
    C:\Projects\uno\Ciao.cc|11|error: expected `)' before '*' token|
    C:\Projects\uno\Ciao.cc|11|error: expected `,' or `;' before '*' token|
    C:\Projects\uno\Ciao.cc||In function `int main(int, char**)':|
    C:\Projects\uno\Ciao.cc|24|error: `QApplication' undeclared (first use this function)|
    C:\Projects\uno\Ciao.cc|24|error: (Each undeclared identifier is reported only once for each function it appears in.)|
    C:\Projects\uno\Ciao.cc|24|error: expected `;' before "app"|
    C:\Projects\uno\Ciao.cc|26|error: 'class MyWidget' has no member named 'show'|
    C:\Projects\uno\Ciao.cc|27|error: `app' undeclared (first use this function)|
    ||=== Build finished: 13 errors, 0 warnings ===|
    Last edited by jpn; 5th July 2008 at 19:26. Reason: missing [code] tags

Similar Threads

  1. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  2. Replies: 2
    Last Post: 8th November 2007, 20:15
  3. What is debug mode for without MSVC?
    By firegun9 in forum Newbie
    Replies: 1
    Last Post: 5th September 2007, 17:21
  4. Qt4 open src mingw from a PC to another
    By nvictor in forum Installation and Deployment
    Replies: 11
    Last Post: 1st May 2007, 17:41
  5. Adding custom defines when on debug build
    By chus in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2007, 11:38

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.