Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator 's bug? If my program has scanf(), getchar() or some like them, It can't run!
Forum Updated to NodeBB v4.3 + New Features

Qt Creator 's bug? If my program has scanf(), getchar() or some like them, It can't run!

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 2 Posters 966 Views
  • 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.
  • Z Offline
    Z Offline
    zzc2422
    wrote on last edited by
    #1

    I'm using Qt Creator in linux, Debian. No matter whether I install it with "apt install qtcreator", or with the ".run" installation file in the official website, the problem appears!
    For example, if I try to run this program, it shows "starting ***(my program name)..." and can't go on.
    ![alt text](/DATA_SSD/.linux/home/zzc/图片/2019-08-19 20-33-50屏幕截图.png)
    However, if I delete the "getchar()", it can print "Hello World!"!
    ![alt text](/DATA_SSD/.linux/home/zzc/图片/2019-08-19 20-37-17屏幕截图.png)
    Similarly, if I use scanf() like getchar(), it also show that and can't go on!
    Do anyone know how to sovle it?

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zzc2422
      wrote on last edited by
      #2

      (I'm the questioner)
      Besides, for the file which Qt Creator compiles out, if I run it directly, there is no problem. It just can't be run in Qt Creator.

      aha_1980A 1 Reply Last reply
      0
      • Z zzc2422

        (I'm the questioner)
        Besides, for the file which Qt Creator compiles out, if I run it directly, there is no problem. It just can't be run in Qt Creator.

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by aha_1980
        #3

        Hi @zzc2422

        (your picture upload did not work, it seems, so I'm guessing).

        Do you run your program in a terminal window or directly in Creators Application Output? Because the Application Output is really only an output, you cannot input anything there.

        That is tracked by QTCREATORBUG-12453 and linked reports. Feel free to comment and vote there.

        Regards

        Qt has to stay free or it will die.

        Z 1 Reply Last reply
        3
        • aha_1980A aha_1980

          Hi @zzc2422

          (your picture upload did not work, it seems, so I'm guessing).

          Do you run your program in a terminal window or directly in Creators Application Output? Because the Application Output is really only an output, you cannot input anything there.

          That is tracked by QTCREATORBUG-12453 and linked reports. Feel free to comment and vote there.

          Regards

          Z Offline
          Z Offline
          zzc2422
          wrote on last edited by
          #4

          @aha_1980 Thank you! So I tried to use the setting to run in terminal. I used to fail, but then I found the problem is in my terminal.
          After all, I can run in terminal now!

          aha_1980A 1 Reply Last reply
          2
          • Z zzc2422

            @aha_1980 Thank you! So I tried to use the setting to run in terminal. I used to fail, but then I found the problem is in my terminal.
            After all, I can run in terminal now!

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @zzc2422 Thanks for reporting back.

            So please mark this topic as SOLVED now.

            Regards

            Qt has to stay free or it will die.

            1 Reply Last reply
            1

            • Login

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