I always get the error code 255 but why?!

  • What are the reasons that cause breaking your program during the compiling then it exit with code 255 ?

  • another time (I changed nothing) and the program exited with the code -1073741819 .
    Has this a realtionship with the memory ?

  • You really, really have to provide more information than this. Did you try a debugger to see what goes wrong where?

  • @marachli
    I'm having the same problem! Well in reverse order (first I got error -1073741819 and then after minor changes error 255), were you able to fix it?

  • After an upgrade to Qt_5_4_2_MinGW_32bit, (Qt5.5), on a updated win8 computer, I consistently get the error exited with code 255.

    I tried a clean qt widget application from the template with no changes at all:

    #include "mainwindow.h"
    #include "ui_mainwindow.h"

    MainWindow::MainWindow(QWidget *parent) :
    ui(new Ui::MainWindow)

    delete ui;

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H

    #include <QMainWindow>

    namespace Ui {
    class MainWindow;

    class MainWindow : public QMainWindow

    explicit MainWindow(QWidget *parent = 0);

    Ui::MainWindow *ui;

    #endif // MAINWINDOW_H

    #include "mainwindow.h"
    #include <QApplication>

    int main(int argc, char *argv[])
    QApplication a(argc, argv);
    MainWindow w;

    return a.exec();


    pro file:
    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = untitled2
    TEMPLATE = app

    SOURCES += main.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    Starting C:\Users\Gustaf\build-untitled2-Desktop_Qt_5_4_2_MinGW_32bit2-Debug\debug\untitled2.exe...
    C:\Users\Gustaf\build-untitled2-Desktop_Qt_5_4_2_MinGW_32bit2-Debug\debug\untitled2.exe exited with code 255

    Thanks in advance,

  • Qt Champions 2017

    Hi and welcome
    make sure to try disable virus scanner and test. I had issues with Avast.
    Do the program run and when you exit it gives code?
    Or don't it run at all?

  • @mrjj

    i also get the problem, the program doesnt run at all, and when i tried to use the debugger of qt creator a window keep popping up that says
    An exception was triggered:
    Exception at 0x7718d4f2, code: 0x0000135: DLL not found, flags=0x0
    During startup program exited with code 0x0000135

  • Qt Champions 2017

    @Pogi said:

    DLL not found,

    you code try to load some DLL that is not around.

  • For me, the issue was that the app couldn't access the DLL (that existed). I rebuilt Qt statically and that solved the issue.

    Maybe a dirty solution, but now I can compile and run the app.

  • Qt Champions 2017

    well static linking is not dirty in any ways :)
    However the Qt licencing requires statically linked programs to be open source
    or buy a licence for Qt so often its not a solution for most.
    But building it static will make it shut up about any DLLS :)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.