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. Console Applications
Forum Updated to NodeBB v4.3 + New Features

Console Applications

Scheduled Pinned Locked Moved Solved General and Desktop
47 Posts 8 Posters 26.2k Views 5 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.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by tomy
    #29

    Yes, I did it and I think the system is set now and ready for the next tests. You can look at this:
    alt text
    "text.exe" exists but nothing is shown after test.exe in CMD.

    Update:
    After re-opening the CMD and testing the .exe:
    alt text

    FlotisableF E mrjjM 3 Replies Last reply
    0
    • tomyT tomy

      Yes, I did it and I think the system is set now and ready for the next tests. You can look at this:
      alt text
      "text.exe" exists but nothing is shown after test.exe in CMD.

      Update:
      After re-opening the CMD and testing the .exe:
      alt text

      FlotisableF Offline
      FlotisableF Offline
      Flotisable
      wrote on last edited by
      #30

      @tomy
      what code you write in test?

      1 Reply Last reply
      0
      • tomyT tomy

        Yes, I did it and I think the system is set now and ready for the next tests. You can look at this:
        alt text
        "text.exe" exists but nothing is shown after test.exe in CMD.

        Update:
        After re-opening the CMD and testing the .exe:
        alt text

        E Offline
        E Offline
        Eeli K
        wrote on last edited by
        #31

        @tomy Locate the libgcc_... file on your system and copy it to the same directory with the exe. Or set the PATH variable. See http://stackoverflow.com/questions/4702732/the-program-cant-start-because-libgcc-s-dw2-1-dll-is-missing.

        1 Reply Last reply
        0
        • tomyT tomy

          @mrjj

          Hi
          An alternative to fiddling with path is to run the
          c:\Qt\5.8\mingw53_32\bin\qtenv2.bat
          in the cmd before trying to compile.

          Hi,
          "The system cannot find the path specified."
          Anyway, it's not that important and we can leave it out because it's not my purpose to be familiar with running files from CMd, now. Maybe when needed.
          (I liked to test that simple example this way but, the testing may not be so easy) Thanks.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #32

          @tomy said in Console Applications:

          "The system cannot find the path specified."

          Well you need to use the correct path for your installation.
          It sets the correct path for tools but that you can also do in other ways.

          1 Reply Last reply
          0
          • tomyT tomy

            Yes, I did it and I think the system is set now and ready for the next tests. You can look at this:
            alt text
            "text.exe" exists but nothing is shown after test.exe in CMD.

            Update:
            After re-opening the CMD and testing the .exe:
            alt text

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #33

            @tomy
            You need to provide the DLLs it wants from the CORRECT compiler folder under c:\Qt
            so you end up with (maybe more DLLs)
            alt text

            Please read
            http://www.tripleboot.org/?p=138

            tomyT 1 Reply Last reply
            0
            • mrjjM mrjj

              @tomy
              You need to provide the DLLs it wants from the CORRECT compiler folder under c:\Qt
              so you end up with (maybe more DLLs)
              alt text

              Please read
              http://www.tripleboot.org/?p=138

              tomyT Offline
              tomyT Offline
              tomy
              wrote on last edited by
              #34

              @mrjj

              You need to provide the DLLs it wants from the CORRECT compiler folder under c:\Qt
              so you end up with (maybe more DLLs)

              I added them from the folder: C:\Qt\Qt5.8.0\5.8\mingw53_32
              No reaction.

              mrjjM 1 Reply Last reply
              0
              • tomyT tomy

                @mrjj

                You need to provide the DLLs it wants from the CORRECT compiler folder under c:\Qt
                so you end up with (maybe more DLLs)

                I added them from the folder: C:\Qt\Qt5.8.0\5.8\mingw53_32
                No reaction.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #35

                @tomy
                Did you read the link ?
                Anyway, it might need extra dlls :)
                You can try the tool
                http://doc.qt.io/qt-5/windows-deployment.html

                or use
                http://www.dependencywalker.com/
                To check the dlls.

                Anyway, to make it run, that release folder must be an deployment folder so keep reading docs and it will work :)

                1 Reply Last reply
                1
                • tomyT Offline
                  tomyT Offline
                  tomy
                  wrote on last edited by
                  #36

                  At the beginning there were only four simple CLI commands to get the result on our contraction, but now I see after doing more than 4x commands I haven't the file run, and still need to go on!
                  Why should we bother themselves this way! In the Qt Creator or Visual Studio (for console apps) we can get the result in 10x faster than this CLI method.

                  CLI may be faster in some cases, but not in this one, at least!
                  Thank you all. Let's don't continue the topic. Thanks again.

                  mrjjM A 2 Replies Last reply
                  0
                  • tomyT tomy

                    At the beginning there were only four simple CLI commands to get the result on our contraction, but now I see after doing more than 4x commands I haven't the file run, and still need to go on!
                    Why should we bother themselves this way! In the Qt Creator or Visual Studio (for console apps) we can get the result in 10x faster than this CLI method.

                    CLI may be faster in some cases, but not in this one, at least!
                    Thank you all. Let's don't continue the topic. Thanks again.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #37

                    @tomy
                    well being experienced means you know for each job what is the right tool.
                    Besides using GUI or CLI is 2 sides of same coin. If you look in
                    Creator/VS you can see the command line it uses to get the job done.

                    So if i need CLI action i will visually create and edit files and then simply steal the CLI line to build it.

                    That way i can use CLI when it suits :)

                    Its not fair to dismiss CLI as GUI would be nothing without it.

                    GUI was invented to make life easier for those of us that feels CLI is just too much typing but i work with ppl that can create something 10X faster using CLI. Building libs and dependencies. They like CLI for the direct
                    power user control it gives. If its not for your liking ( or mine ;) then its not the tools fault in my opinion.

                    The reason it just dont work for you is that the environment is not setup and u are used to the IDE setting it up before running exe. The qtenv2.bat was part of that automation etc. So power user will bother to use CLI as its
                    efficient and there is noi layer in between (the IDE) so they prefer CLI and some kinky editor :)

                    1 Reply Last reply
                    5
                    • tomyT tomy

                      At the beginning there were only four simple CLI commands to get the result on our contraction, but now I see after doing more than 4x commands I haven't the file run, and still need to go on!
                      Why should we bother themselves this way! In the Qt Creator or Visual Studio (for console apps) we can get the result in 10x faster than this CLI method.

                      CLI may be faster in some cases, but not in this one, at least!
                      Thank you all. Let's don't continue the topic. Thanks again.

                      A Offline
                      A Offline
                      ambershark
                      wrote on last edited by ambershark
                      #38

                      @tomy said in Console Applications:

                      At the beginning there were only four simple CLI commands to get the result on our contraction, but now I see after doing more than 4x commands I haven't the file run, and still need to go on!
                      Why should we bother themselves this way! In the Qt Creator or Visual Studio (for console apps) we can get the result in 10x faster than this CLI method.

                      CLI may be faster in some cases, but not in this one, at least!
                      Thank you all. Let's don't continue the topic. Thanks again.

                      Oh yea CLI is faster in some cases not all. The reason I recommended you trying the CLI for a console app is to learn this stuff. But I bet if we raced, me on a CLI, you with the IDE, I'd win every time. ;) I'm not saying don't use an IDE, they are great. But you should at least understand what the IDE is hiding from you (or making easier). Like @mrjj said GUIs are just making life easier for people who want to type less. And they usually do a great job. I use an IDE too, but not always. For a lot of things I use the CLI since it's so much faster. Git for instance. Almost always command line unless there is a complex command, then I'll use a gui.

                      All the problems you're running into here are things you will need to know how to deal with. If you were to distribute any software you would need to deal with all these dlls to get it to run on someone else's machine. This is normal development stuff that the IDE is hiding from you. It's very important to learn.

                      This is also really only an issue with windows. Windows has (at least in my opinion) really annoying ways of finding and using libraries for an application. On a linux or mac system with a properly set up Qt environment, the binary would just run without needing to be pointed at the right supporting libraries, or having to make a distribution by copying the libs to your app directory.

                      Well, not entirely true, posix OSes have these issues as well but it's really only when you need to make a release distribution and not during development. Even on the command line.

                      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                      1 Reply Last reply
                      2
                      • tomyT Offline
                        tomyT Offline
                        tomy
                        wrote on last edited by tomy
                        #39

                        Yeah, of course you would win :-) ;)

                        GUIs are just making life easier for people who want to type less.

                        All people (except professionals) like this way; and since I want to be a professional on this case too, I will certainly catch this topic. I think when I will start using Linux, it will be a good point to learn it too, or even by using the Linux terminal it will be easily achievable.

                        If you were to distribute any software you would need to deal with all these dlls to get it to run on someone else's machine.

                        I've done this before. :-)
                        When I using my C++ experience became able to write a good accurate Qt GUI calculator while I'd read only the first chapter of the Qt book (a few pages), I went to make it installable on others' machines and went to the end of the process and by Qt Framework Installer the goal was available. ;)

                        So, I'd gone the way, "but", I wouldn't like to re-go through such a rather complex way for such a simple code (main.cpp). :)

                        Windows has (at least in my opinion) really annoying ways of finding and using libraries for an application.

                        :-) :D
                        Thanks.

                        A 1 Reply Last reply
                        1
                        • tomyT tomy

                          Yeah, of course you would win :-) ;)

                          GUIs are just making life easier for people who want to type less.

                          All people (except professionals) like this way; and since I want to be a professional on this case too, I will certainly catch this topic. I think when I will start using Linux, it will be a good point to learn it too, or even by using the Linux terminal it will be easily achievable.

                          If you were to distribute any software you would need to deal with all these dlls to get it to run on someone else's machine.

                          I've done this before. :-)
                          When I using my C++ experience became able to write a good accurate Qt GUI calculator while I'd read only the first chapter of the Qt book (a few pages), I went to make it installable on others' machines and went to the end of the process and by Qt Framework Installer the goal was available. ;)

                          So, I'd gone the way, "but", I wouldn't like to re-go through such a rather complex way for such a simple code (main.cpp). :)

                          Windows has (at least in my opinion) really annoying ways of finding and using libraries for an application.

                          :-) :D
                          Thanks.

                          A Offline
                          A Offline
                          ambershark
                          wrote on last edited by
                          #40

                          @tomy said in Console Applications:

                          I think when I will start using Linux, it will be a good point to learn it too, or even by using the Linux terminal it will be easily achievable.

                          Definitely a good time to learn command line stuff. Linux is a command line OS. You can install a window manager and run GUI apps but it's not a native linux thing. It's a completely separate program.

                          You don't necessarily need to learn the command line stuff to succeed as a professional developer, but it will help a lot. And you will never be as good as someone else who knows it.

                          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                          jsulmJ 1 Reply Last reply
                          1
                          • A ambershark

                            @tomy said in Console Applications:

                            I think when I will start using Linux, it will be a good point to learn it too, or even by using the Linux terminal it will be easily achievable.

                            Definitely a good time to learn command line stuff. Linux is a command line OS. You can install a window manager and run GUI apps but it's not a native linux thing. It's a completely separate program.

                            You don't necessarily need to learn the command line stuff to succeed as a professional developer, but it will help a lot. And you will never be as good as someone else who knows it.

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

                            @ambershark said in Console Applications:

                            You don't necessarily need to learn the command line stuff to succeed as a professional developer

                            I disagree with this statement. As professional developer you should know how to use command line. You often need to use it directly or write scripts. And besides the need to use it you should know it to better understand how the system is working.

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

                            A 1 Reply Last reply
                            2
                            • tomyT Offline
                              tomyT Offline
                              tomy
                              wrote on last edited by tomy
                              #42

                              To both of of you: good points thanks.
                              I can assure you I've made my decision and in few days I will install the latest version of Ubuntu and (as I told you dear friend ambershark) I will ask to suggest me a good tut to help me start using the OS (and I know there are many tuts on the Web, but I'd like to see your suggestions).

                              Thank you very Much.

                              mrjjM 1 Reply Last reply
                              1
                              • tomyT tomy

                                To both of of you: good points thanks.
                                I can assure you I've made my decision and in few days I will install the latest version of Ubuntu and (as I told you dear friend ambershark) I will ask to suggest me a good tut to help me start using the OS (and I know there are many tuts on the Web, but I'd like to see your suggestions).

                                Thank you very Much.

                                mrjjM Offline
                                mrjjM Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on last edited by mrjj
                                #43

                                @tomy said in Console Applications:

                                Ubuntu

                                Hi
                                Ubuntu comes default with a manager called unity.
                                If you want a more windows like
                                experience then (also) try
                                http://www.kubuntu.org/
                                It uses KDE and is very easy to navigate if already windows trained.
                                All ubuntu have good docs
                                https://help.ubuntu.com/kubuntu/desktopguide/C/ (old)
                                https://help.ubuntu.com/community

                                The files system is the biggest surprise. (mostly good)
                                But a new linux user , the following is good to know from day one:
                                1:
                                Its case sensitive
                                in same folder you can have a.txt and A.txt and its NOT same file.
                                So anything with paths/filenames, be extra careful. One big letter in wrong place
                                and it's not valid.
                                2:
                                To run scripts or exe files u download, you need to flag them as "can be run"
                                chmod +x filename ( in correct case)
                                Often you can also right click and set it.
                                3:
                                You often have to use "./" in front of files to say "in this folder"
                                say you are in a folder and it has test.exe
                                If you dont say ./text.exe it will say it cant find file which is often
                                confusing as you are looking at it :)
                                4:
                                If safe to try a billion new programs. Linux has a much tighter systems for "apps"
                                and once you remove them , it's like they were never there so unlike windows
                                it won't gobble up or get slow over time. (in the same way)
                                5:
                                Most things you do in windows have a just as good solution in Linux. Just
                                have to find the right program. Only program i could never really find a good match for
                                was Photoshop but gimp is close. So if you think that some app in linux sucks then
                                go to app center and have a look. Often there are 10 alternatives to just click Install on and
                                use. Like an app store for Desktop. But not limited apps but full blown desktop programs.
                                What is not to like :)

                                1 Reply Last reply
                                4
                                • jsulmJ jsulm

                                  @ambershark said in Console Applications:

                                  You don't necessarily need to learn the command line stuff to succeed as a professional developer

                                  I disagree with this statement. As professional developer you should know how to use command line. You often need to use it directly or write scripts. And besides the need to use it you should know it to better understand how the system is working.

                                  A Offline
                                  A Offline
                                  ambershark
                                  wrote on last edited by
                                  #44

                                  @jsulm said in Console Applications:

                                  @ambershark said in Console Applications:

                                  You don't necessarily need to learn the command line stuff to succeed as a professional developer

                                  I disagree with this statement. As professional developer you should know how to use command line. You often need to use it directly or write scripts. And besides the need to use it you should know it to better understand how the system is working.

                                  I can't imagine life without the command line. But I have worked with people over the years that didn't know how to use it at all. Some knew, but barely. They were well paid professional developers.

                                  While I agree with what you're saying and think that people should definitely know CLI stuff, I also know professionals that don't. Which is why I made that statement.

                                  That being said, they were not very good. Especially compared to those of us that knew it. :) So I totally get where you're coming from when you say that.

                                  My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                                  1 Reply Last reply
                                  2
                                  • E Offline
                                    E Offline
                                    Eeli K
                                    wrote on last edited by
                                    #45

                                    As a side note, if you want to practice Linux command line but don't want to install Linux, you can start with Cygwin. If I have the power of the administrator when working with Windows I usually eventually install Cygwin on it and keep a Cygwin terminal window open. Almost all the basic command line tools (which are not very low-level system related) are there. Including programming language compilers and interpreters: gcc, python, perl...

                                    If you know Linux command line it's an enticing option to do file management etc. in a Cygwin terminal. Or running the compiler and git commands.

                                    JKSHJ 1 Reply Last reply
                                    4
                                    • E Eeli K

                                      As a side note, if you want to practice Linux command line but don't want to install Linux, you can start with Cygwin. If I have the power of the administrator when working with Windows I usually eventually install Cygwin on it and keep a Cygwin terminal window open. Almost all the basic command line tools (which are not very low-level system related) are there. Including programming language compilers and interpreters: gcc, python, perl...

                                      If you know Linux command line it's an enticing option to do file management etc. in a Cygwin terminal. Or running the compiler and git commands.

                                      JKSHJ Offline
                                      JKSHJ Offline
                                      JKSH
                                      Moderators
                                      wrote on last edited by
                                      #46

                                      @Eeli-K said in Console Applications:

                                      As a side note, if you want to practice Linux command line but don't want to install Linux, you can start with Cygwin.

                                      Or Bash on Windows 10: https://msdn.microsoft.com/en-au/commandline/wsl/about

                                      (But if @tomy has already installed full Ubuntu, he should just start with that instead of now downloading Cygwin or Bash)

                                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                      1 Reply Last reply
                                      4
                                      • tomyT Offline
                                        tomyT Offline
                                        tomy
                                        wrote on last edited by
                                        #47

                                        Thank you all very much.
                                        Yes, I don't like those stuffs and like to have the whole thing.

                                        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