Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can build but cannot run
Forum Updated to NodeBB v4.3 + New Features

Can build but cannot run

Scheduled Pinned Locked Moved General and Desktop
12 Posts 4 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by
    #2

    welcome to devnet

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

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      genek1
      wrote on last edited by
      #3

      qt 5.2.0
      win 7

      code:
      @#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;
      }@

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #4

        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.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • G Offline
          G Offline
          genek1
          wrote on last edited by
          #5

          there are no exe in given catalog
          working directory exists

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #6

            Are you sure that can build successfully?

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              genek1
              wrote on last edited by
              #7

              yes, there are no errors after building

              1 Reply Last reply
              0
              • J Offline
                J Offline
                janfaroe
                wrote on last edited by
                #8

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

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  genek1
                  wrote on last edited by
                  #9

                  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]

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #10

                    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":http://qt-project.org/forums/viewforum/44/ 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 ;-)

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      Hi,

                      One more thing :

                      @image=imread("H:\programy\qt\Tools\QtCreator\bin\samochod\zdjecie.jpg");@

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

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        genek1
                        wrote on last edited by
                        #12

                        rerun qmake doesn't help

                        yes it's polish, but english forum is ok

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved