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. Getting executable to run from command line

Getting executable to run from command line

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 806 Views 2 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.
  • ocgltdO Offline
    ocgltdO Offline
    ocgltd
    wrote on last edited by
    #1

    My simple app runs fine within Qt creator. So I went to a command line and changed to the directory holding the compiled file. I also added the correct Mingw directory to the PATH statement (in front of other dirs).

    When I run the app from the command line I get error:

    The procedure entry point _Z20qResourceFeatureZlibv count not be located in the dynamic link library c:\myapp.exe
    

    I'm sure the path matches the compiler used. Is there something else wrong here?

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

      Hi,

      Did you use windeployqt to properly deploy your application ?

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

      ocgltdO 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Did you use windeployqt to properly deploy your application ?

        ocgltdO Offline
        ocgltdO Offline
        ocgltd
        wrote on last edited by
        #3

        @SGaist No - I'm trying to run it on the SAME machine where it was compiled, from the directory where QtCreator placed the exe.

        jsulmJ J.HilkJ 2 Replies Last reply
        1
        • ocgltdO ocgltd

          @SGaist No - I'm trying to run it on the SAME machine where it was compiled, from the directory where QtCreator placed the exe.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ocgltd QtCreator sets up the environment before starting your app. You should use windeployqt to deploy your app if you want to start it outside of QtCreator.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • ocgltdO ocgltd

            @SGaist No - I'm trying to run it on the SAME machine where it was compiled, from the directory where QtCreator placed the exe.

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by J.Hilk
            #5

            @ocgltd if you're on windows, you can look into the install folder of Qt and look for this bat file qtenv2.bat and if you're using MSVC also look for and execute vcvarsall.bat that should set up the environment of your command prompt to the default settings of QtCreator

            but this is temporary solution, the proper way is to deploy the application with the deployment tool, or by hand, like the others suggested


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            3

            • Login

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