Results 1 to 9 of 9

Thread: Error running executable

  1. #1
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Error running executable

    Hi. I've got a problem. When compile project files:
    Maker.cpp
    Qt Code:
    1. #include <QtGui>
    2.  
    3. #include "maker.h"
    4.  
    5. MainWindow::MainWindow(QMainWindow *parent)
    6. : QMainWindow(parent)
    7. {
    8. ui.setupUi(this);
    9. connect(actionAbout, SIGNAL(triggered()), this, SLOT(abcziom()));
    10. }
    11. void MainWindow::abcziom()
    12.  
    13. {
    14. QMessageBox::warning(this, tr("About Application"),
    15. tr("The <b>Application</b> example demonstrates how to "
    16. "write modern GUI applications using Qt, with a menu bar, "
    17. "toolbars, and a status bar."));
    18.  
    19. }
    To copy to clipboard, switch view to plain text mode 
    Maker.h
    Qt Code:
    1. #ifndef MAKER_H
    2. #define MAKER_H
    3.  
    4. #include "ui_maker.h"
    5.  
    6.  
    7. class MainWindow : public QMainWindow, public Ui::MainWindow
    8. {
    9. Q_OBJECT
    10.  
    11. public:
    12. MainWindow(QMainWindow *parent = 0);
    13.  
    14. private slots:
    15.  
    16. void abcziom();
    17.  
    18. private:
    19.  
    20. Ui::MainWindow ui;
    21. };
    22.  
    23. #endif
    To copy to clipboard, switch view to plain text mode 
    ui_Maker.h, resource.qrc, and main.cpp:
    Qt Code:
    1. #include <QApplication>
    2. #include <QPlastiqueStyle>
    3. #include "maker.h"
    4.  
    5. int main(int argc, char *argv[])
    6. {
    7. QApplication::setStyle ( new QPlastiqueStyle() );
    8. QApplication app(argc, argv);
    9. MainWindow MainWindow;
    10. MainWindow.show();
    11. return app.exec();
    12. }
    To copy to clipboard, switch view to plain text mode 
    everything is ok, is builds the executable, but when I try to run it, there appear well known window - this is translation -
    There appeared error with Test.exe application and it will be shut down. Sorry for problems. (the Polish version is: Wystąpił problem z aplikacją Test.exe i zostanie ona zamknięta. Przepraszamy za kłopoty.)
    What is wrong? I tried to compile it twice, but without success. Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Error running executable

    There is a good chance your application crashes Try debugging it. What exact OS are you using?

  3. #3
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error running executable

    I'm using Windows

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Error running executable

    Yes, I know that I was asking for a more specific response. And by the way, which compiler do you use?

  5. #5
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error running executable

    What about actionAbout?
    Where is that created?

  6. #6
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error running executable

    Quote Originally Posted by wysota View Post
    Yes, I know that I was asking for a more specific response. And by the way, which compiler do you use?
    I don't use a compiler, I compile everything by console (qmake -o Makefile...). Oh, sure, I'm using XP 2000 HE
    Quote Originally Posted by marcel View Post
    What about actionAbout?
    Where is that created?
    It,s created in ui_maker.h

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Error running executable

    Quote Originally Posted by Salazaar View Post
    I don't use a compiler, I compile everything by console (qmake -o Makefile...).
    http://en.wikipedia.org/wiki/Compiler

  8. #8
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error running executable

    I don't use a compiler, I compile everything by console (qmake -o Makefile...). Oh, sure, I'm using XP 2000 HE
    Oh, that will make things easier...

    Try running the application without setting that style.
    See if it works.

    Anyway, I'm going to answer for you: you're using mingw - therefore the compiler is g++.

  9. #9
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Error running executable

    Yes I'm using MinGW compiler (sorry, wysota)

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.