Important: Please read the Qt Code of Conduct -

Can build but cannot run

  • I can build app, but when i'm trying to run it there is error that says there is no exe file

  • welcome to devnet

    You need to provide a bit more information.
    Qt version?
    and possibly more.

  • qt 5.2.0
    win 7

    @#include <stdio.h>
    #include <iostream>
    #include "opencv2/core/core.hpp"
    #include "opencv2/features2d/features2d.hpp"
    #include "opencv2/highgui/highgui.hpp"
    #include "opencv2/calib3d/calib3d.hpp"
    #include "opencv2/nonfree/nonfree.hpp"

    using namespace std;
    using namespace cv;

    int main()
    Mat image=imread("H:\programy\qt\Tools\QtCreator\bin\samochod\zdjecie.jpg"); //wczytuje obraz
    imshow("Lena",image);//wyświetla obraz
    waitKey();//wstrzymuje działanie programu
    return 0;

  • On left side you find "Projects" and there under "run" you can check the run settings. The complete executable's name is given. Check it's presence.
    Furthermore make sure that there is not a non-existing working directory given. IIRC this gives the same message back.

  • there are no exe in given catalog
    working directory exists

  • Are you sure that can build successfully?

  • yes, there are no errors after building

  • Please check the compile output pane and see if there's any useful messages.

  • Here is these messages. I don't know if it's useful.
    17:15:09: Uruchamianie kroków budowania dla projektu samochod...
    17:15:09: Konfiguracja niezmieniona, krok qmake opuszczony.
    17:15:09: Uruchamianie "H:\programy\qt\Tools\mingw48_32\bin\mingw32-make.exe"
    H:/programy/qt/Tools/mingw48_32/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory 'H:/programy/qt/Tools/QtCreator/bin/build-samochod-Desktop_Qt_5_2_0_MinGW_32bit-Debug'
    g++ -Wl,-subsystem,console -mthreads -o debug\samochod.exe debug/main.o -LH:/programy/opencv/opencv_qt/lib -lopencv_highgui248d -lopencv_core248d -lopencv_imgproc248d -lopencv_calib3d248d -lopencv_features2d248d -opencv_nonfree248
    mingw32-make[1]: Leaving directory 'H:/programy/qt/Tools/QtCreator/bin/build-samochod-Desktop_Qt_5_2_0_MinGW_32bit-Debug'
    17:15:09: Proces "H:\programy\qt\Tools\mingw48_32\bin\mingw32-make.exe" zakończył się normalnie.
    17:15:09: Czas trwania: 00:00.

    [edit, code tags added, koahnig]

  • That is what google translater makes of the Polish text:
    5:15:09 p.m.: Running build steps for project car ...
    5:15:09 p.m.: Configuration unchanged, step qmake abandoned.
    5:15:09 p.m.: Running "H: \ programs \ qt \ Tools \ mingw48_32 \ bin \ mingw32-make.exe"
    H :/ programy/qt/Tools/mingw48_32/bin/mingw32-make-f Makefile.Debug
    mingw32-make1: Entering directory H :/ programy/qt/Tools/QtCreator/bin/build-samochod-Desktop_Qt_5_2_0_MinGW_32bit-Debug '
    g+ +-Wl,-subsystem, console-mthreads-o debug \ samochod.exe debug / main.o-LH :/ Programs / opencv / opencv_qt / lib-lopencv_highgui248d-lopencv_core248d-lopencv_imgproc248d-lopencv_calib3d248d-lopencv_features2d248d-opencv_nonfree248
    mingw32-make1: Leaving directory H :/ programy/qt/Tools/QtCreator/bin/build-samochod-Desktop_Qt_5_2_0_MinGW_32bit-Debug '
    5:15:09 p.m.: The process of "H: \ programs \ qt \ Tools \ mingw48_32 \ bin \ mingw32-make.exe" ended normally.
    5:15:09 p.m. Duration: 0:00.

    You might want to "rerun qmake" on the project and afterwards a "rebuild". You do that by right click on the project's name and choose those options.

    Just to make you aware of, there is a "Polish forum": here on devnet. You might try it there as well. However, even so, there are some people on devnet talking Polish, it could be faster to get a solution in English.
    If this is not Polish, I apologize, but I was letting google translate make the decision ;-)

  • Lifetime Qt Champion


    One more thing :


    You forgot to escape the backslashes so your image won't be found

  • rerun qmake doesn't help

    yes it's polish, but english forum is ok

Log in to reply