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. Qt Programming Language
Forum Update on Monday, May 27th 2025

Qt Programming Language

Scheduled Pinned Locked Moved Unsolved General and Desktop
331 Posts 17 Posters 310.3k 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.
  • A Annabelle
    16 Jul 2019, 05:24

    @JKSH said in Qt Programming Language:

    @Annabelle said in Qt Programming Language:

    And now when I try to build and run, I get this error.

    I don't have experience with Code::Blocks, so my ability to help you is a bit limited. Nonetheless, my guess is that you installed Code::Blocks first, and then you downloaded MinGW from a different place. Is this correct? If so, there is likely a configuration problem.

    The cleanest way forward is probably to:

    1. Uninstall Code::Blocks
    2. Uninstall MinGW
    3. Download the single package which sets up both for you. Select codeblocks-17.12mingw-setup.exe from http://www.codeblocks.org/downloads/26

    If you still have issues after all of this, the folks at the Code::Blocks forum might be better able to help you: forums.codeblocks.org/

    I tried downloading Codeblocks Mingw Setup from https://sourceforge.net/projects/codeblocks/, but it fails every time. What do I do next?

    J Offline
    J Offline
    jsulm
    Lifetime Qt Champion
    wrote on 16 Jul 2019, 05:27 last edited by
    #295

    @Annabelle said in Qt Programming Language:

    but it fails every time

    Works here. Do you have bad Internet connection?
    Try https://www.fosshub.com/Code-Blocks.html?dwl=codeblocks-17.12mingw-setup.exe

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

    A 1 Reply Last reply 16 Jul 2019, 05:31
    1
    • J jsulm
      16 Jul 2019, 05:27

      @Annabelle said in Qt Programming Language:

      but it fails every time

      Works here. Do you have bad Internet connection?
      Try https://www.fosshub.com/Code-Blocks.html?dwl=codeblocks-17.12mingw-setup.exe

      A Offline
      A Offline
      Annabelle
      wrote on 16 Jul 2019, 05:31 last edited by
      #296

      @jsulm said in Qt Programming Language:

      @Annabelle said in Qt Programming Language:

      but it fails every time

      Works here. Do you have bad Internet connection?
      Try https://www.fosshub.com/Code-Blocks.html?dwl=codeblocks-17.12mingw-setup.exe

      My internet connection is through the main headquarters of the apartment complex in which I live. It's powered by Centurylink, and can be hit or miss at times.

      J 1 Reply Last reply 16 Jul 2019, 05:33
      0
      • A Annabelle
        16 Jul 2019, 05:31

        @jsulm said in Qt Programming Language:

        @Annabelle said in Qt Programming Language:

        but it fails every time

        Works here. Do you have bad Internet connection?
        Try https://www.fosshub.com/Code-Blocks.html?dwl=codeblocks-17.12mingw-setup.exe

        My internet connection is through the main headquarters of the apartment complex in which I live. It's powered by Centurylink, and can be hit or miss at times.

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 16 Jul 2019, 05:33 last edited by
        #297

        @Annabelle Did you try the link I posted?

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

        A 2 Replies Last reply 16 Jul 2019, 09:52
        1
        • J jsulm
          16 Jul 2019, 05:33

          @Annabelle Did you try the link I posted?

          A Offline
          A Offline
          Annabelle
          wrote on 16 Jul 2019, 09:52 last edited by
          #298

          @jsulm said in Qt Programming Language:

          @Annabelle Did you try the link I posted?

          Yes. First it failed, then when I switched from my thumb drive to a backup hard drive and tried again, it succeeded!

          1 Reply Last reply
          0
          • J jsulm
            16 Jul 2019, 05:33

            @Annabelle Did you try the link I posted?

            A Offline
            A Offline
            Annabelle
            wrote on 22 Jul 2019, 00:48 last edited by
            #299

            @jsulm said in Qt Programming Language:

            @Annabelle Did you try the link I posted?

            Yes. And now when I try to compile my "Hello World" project, I get this error.
            0_1563756476436_4d68067f-d68d-47df-a74f-0b2a886db32b-image.png
            What did I do wrong?

            J 1 Reply Last reply 22 Jul 2019, 03:28
            0
            • A Annabelle
              22 Jul 2019, 00:48

              @jsulm said in Qt Programming Language:

              @Annabelle Did you try the link I posted?

              Yes. And now when I try to compile my "Hello World" project, I get this error.
              0_1563756476436_4d68067f-d68d-47df-a74f-0b2a886db32b-image.png
              What did I do wrong?

              J Offline
              J Offline
              JKSH
              Moderators
              wrote on 22 Jul 2019, 03:28 last edited by
              #300

              @Annabelle said in Qt Programming Language:

              And now when I try to compile my "Hello World" project, I get this error.

              The error says that your compiler is too old and it doesn't support the C++ 2011 standard. But I'm confused: If you're doing a basic C++ Hello World program, why is Code::Blocks trying to include Qt?

              I suggest you leave Qt out for now. Just focus on learning plain C++. This way, it doesn't matter if you have an old compiler.

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

              A 1 Reply Last reply 23 Jul 2019, 18:11
              2
              • J JKSH
                22 Jul 2019, 03:28

                @Annabelle said in Qt Programming Language:

                And now when I try to compile my "Hello World" project, I get this error.

                The error says that your compiler is too old and it doesn't support the C++ 2011 standard. But I'm confused: If you're doing a basic C++ Hello World program, why is Code::Blocks trying to include Qt?

                I suggest you leave Qt out for now. Just focus on learning plain C++. This way, it doesn't matter if you have an old compiler.

                A Offline
                A Offline
                Annabelle
                wrote on 23 Jul 2019, 18:11 last edited by
                #301

                @JKSH said in Qt Programming Language:

                @Annabelle said in Qt Programming Language:

                And now when I try to compile my "Hello World" project, I get this error.

                The error says that your compiler is too old and it doesn't support the C++ 2011 standard. But I'm confused: If you're doing a basic C++ Hello World program, why is Code::Blocks trying to include Qt?

                I suggest you leave Qt out for now. Just focus on learning plain C++. This way, it doesn't matter if you have an old compiler.

                Now when I compile a project, with regular C++ code, here's what I got in return.

                0_1563905512388_14fc52e1-5a2f-4ad6-9bde-9e719908888d-image.png

                J J 2 Replies Last reply 23 Jul 2019, 18:33
                0
                • A Annabelle
                  23 Jul 2019, 18:11

                  @JKSH said in Qt Programming Language:

                  @Annabelle said in Qt Programming Language:

                  And now when I try to compile my "Hello World" project, I get this error.

                  The error says that your compiler is too old and it doesn't support the C++ 2011 standard. But I'm confused: If you're doing a basic C++ Hello World program, why is Code::Blocks trying to include Qt?

                  I suggest you leave Qt out for now. Just focus on learning plain C++. This way, it doesn't matter if you have an old compiler.

                  Now when I compile a project, with regular C++ code, here's what I got in return.

                  0_1563905512388_14fc52e1-5a2f-4ad6-9bde-9e719908888d-image.png

                  J Offline
                  J Offline
                  JonB
                  wrote on 23 Jul 2019, 18:33 last edited by JonB
                  #302

                  @Annabelle
                  It looks like you have progressed! It seems to be successfully rubnning your gcc compiler.

                  You should open up your Sources folder in the left-hand pane so that we can see what file(s) you have. And perhaps open your main/only .cpp source file into the right-hand pane so that we can see that too.

                  The error message indicates that some .cpp source file has an "odd" character in it, on line #9. The sort of stray character that perhaps got in there from a mis-typing.

                  1 Reply Last reply
                  3
                  • A Annabelle
                    23 Jul 2019, 18:11

                    @JKSH said in Qt Programming Language:

                    @Annabelle said in Qt Programming Language:

                    And now when I try to compile my "Hello World" project, I get this error.

                    The error says that your compiler is too old and it doesn't support the C++ 2011 standard. But I'm confused: If you're doing a basic C++ Hello World program, why is Code::Blocks trying to include Qt?

                    I suggest you leave Qt out for now. Just focus on learning plain C++. This way, it doesn't matter if you have an old compiler.

                    Now when I compile a project, with regular C++ code, here's what I got in return.

                    0_1563905512388_14fc52e1-5a2f-4ad6-9bde-9e719908888d-image.png

                    J Offline
                    J Offline
                    JKSH
                    Moderators
                    wrote on 24 Jul 2019, 00:00 last edited by
                    #303

                    @Annabelle said in Qt Programming Language:

                    Now when I compile a project, with regular C++ code, here's what I got in return.

                    The error message is "stray '\240' in program". This means your .cpp file contains a character that the compiler does not accept.

                    '\240' is a specially-formatted character that represents a space. It can appear when someone copies code from a website or a program like Microsoft Word, and then pastes it into their IDE.

                    Your compiler says that the error is in line 9. I suggest you completely erase lines 8 to 10 to get rid of the '\240' character, and then re-type those lines by hand.

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

                    A 1 Reply Last reply 24 Jul 2019, 01:30
                    4
                    • J JKSH
                      24 Jul 2019, 00:00

                      @Annabelle said in Qt Programming Language:

                      Now when I compile a project, with regular C++ code, here's what I got in return.

                      The error message is "stray '\240' in program". This means your .cpp file contains a character that the compiler does not accept.

                      '\240' is a specially-formatted character that represents a space. It can appear when someone copies code from a website or a program like Microsoft Word, and then pastes it into their IDE.

                      Your compiler says that the error is in line 9. I suggest you completely erase lines 8 to 10 to get rid of the '\240' character, and then re-type those lines by hand.

                      A Offline
                      A Offline
                      Annabelle
                      wrote on 24 Jul 2019, 01:30 last edited by
                      #304

                      @JKSH said in Qt Programming Language:

                      @Annabelle said in Qt Programming Language:

                      Now when I compile a project, with regular C++ code, here's what I got in return.

                      The error message is "stray '\240' in program". This means your .cpp file contains a character that the compiler does not accept.

                      '\240' is a specially-formatted character that represents a space. It can appear when someone copies code from a website or a program like Microsoft Word, and then pastes it into their IDE.

                      Your compiler says that the error is in line 9. I suggest you completely erase lines 8 to 10 to get rid of the '\240' character, and then re-type those lines by hand.

                      What's the \240 character? I'm confused on that one!

                      J 1 Reply Last reply 24 Jul 2019, 02:17
                      0
                      • A Annabelle
                        24 Jul 2019, 01:30

                        @JKSH said in Qt Programming Language:

                        @Annabelle said in Qt Programming Language:

                        Now when I compile a project, with regular C++ code, here's what I got in return.

                        The error message is "stray '\240' in program". This means your .cpp file contains a character that the compiler does not accept.

                        '\240' is a specially-formatted character that represents a space. It can appear when someone copies code from a website or a program like Microsoft Word, and then pastes it into their IDE.

                        Your compiler says that the error is in line 9. I suggest you completely erase lines 8 to 10 to get rid of the '\240' character, and then re-type those lines by hand.

                        What's the \240 character? I'm confused on that one!

                        J Offline
                        J Offline
                        JKSH
                        Moderators
                        wrote on 24 Jul 2019, 02:17 last edited by JKSH
                        #305

                        @Annabelle said in Qt Programming Language:

                        What's the \240 character? I'm confused on that one!

                        As I mentioned before, it is a specially-formatted character that represents a space.

                        There are many ways to represent text: Sighted people draw lines to represent a character, Braille users arrange dot patterns to represent a character, while computers use a number to represent a character. For example, computers represent 'A' as the number 65, 'B' as the number 66, and so on.

                        In computers, there are multiple ways to represent a space. \240 is one such representation. Unfortunately, this representation causes problems for your compiler when it is pasted into your IDE.

                        Since it is a space character, I doubt that your screenreader will read it out. Sighted people can't see the bad character on the screen either.

                        The easiest thing to do is to erase the offending line from your code and re-type the whole line by hand.

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

                        A 1 Reply Last reply 24 Jul 2019, 11:11
                        4
                        • J JKSH
                          24 Jul 2019, 02:17

                          @Annabelle said in Qt Programming Language:

                          What's the \240 character? I'm confused on that one!

                          As I mentioned before, it is a specially-formatted character that represents a space.

                          There are many ways to represent text: Sighted people draw lines to represent a character, Braille users arrange dot patterns to represent a character, while computers use a number to represent a character. For example, computers represent 'A' as the number 65, 'B' as the number 66, and so on.

                          In computers, there are multiple ways to represent a space. \240 is one such representation. Unfortunately, this representation causes problems for your compiler when it is pasted into your IDE.

                          Since it is a space character, I doubt that your screenreader will read it out. Sighted people can't see the bad character on the screen either.

                          The easiest thing to do is to erase the offending line from your code and re-type the whole line by hand.

                          A Offline
                          A Offline
                          Annabelle
                          wrote on 24 Jul 2019, 11:11 last edited by
                          #306

                          @JKSH said in Qt Programming Language:

                          @Annabelle said in Qt Programming Language:

                          What's the \240 character? I'm confused on that one!

                          As I mentioned before, it is a specially-formatted character that represents a space.

                          There are many ways to represent text: Sighted people draw lines to represent a character, Braille users arrange dot patterns to represent a character, while computers use a number to represent a character. For example, computers represent 'A' as the number 65, 'B' as the number 66, and so on.

                          In computers, there are multiple ways to represent a space. \240 is one such representation. Unfortunately, this representation causes problems for your compiler when it is pasted into your IDE.

                          Since it is a space character, I doubt that your screenreader will read it out. Sighted people can't see the bad character on the screen either.

                          The easiest thing to do is to erase the offending line from your code and re-type the whole line by hand.

                          I typed the offending line by hand, and here's what I got.
                          0_1563966708194_ba140787-381a-4ed3-9668-989f1535714a-image.png

                          J 1 Reply Last reply 24 Jul 2019, 11:14
                          2
                          • A Annabelle
                            24 Jul 2019, 11:11

                            @JKSH said in Qt Programming Language:

                            @Annabelle said in Qt Programming Language:

                            What's the \240 character? I'm confused on that one!

                            As I mentioned before, it is a specially-formatted character that represents a space.

                            There are many ways to represent text: Sighted people draw lines to represent a character, Braille users arrange dot patterns to represent a character, while computers use a number to represent a character. For example, computers represent 'A' as the number 65, 'B' as the number 66, and so on.

                            In computers, there are multiple ways to represent a space. \240 is one such representation. Unfortunately, this representation causes problems for your compiler when it is pasted into your IDE.

                            Since it is a space character, I doubt that your screenreader will read it out. Sighted people can't see the bad character on the screen either.

                            The easiest thing to do is to erase the offending line from your code and re-type the whole line by hand.

                            I typed the offending line by hand, and here's what I got.
                            0_1563966708194_ba140787-381a-4ed3-9668-989f1535714a-image.png

                            J Offline
                            J Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on 24 Jul 2019, 11:14 last edited by
                            #307

                            @Annabelle Looks good, it works

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

                            A 1 Reply Last reply 24 Jul 2019, 12:22
                            2
                            • O Offline
                              O Offline
                              ODБOï
                              wrote on 24 Jul 2019, 11:45 last edited by ODБOï
                              #308

                              @Annabelle said in Qt Programming Language:

                              not sure Qt is a Programming Language, maybe this was already discussed, hard to know when topic has 300+ posts...
                              It looks like the OP never created a new thread and asked all his questions in the same one.

                              M 1 Reply Last reply 24 Jul 2019, 11:54
                              0
                              • O ODБOï
                                24 Jul 2019, 11:45

                                @Annabelle said in Qt Programming Language:

                                not sure Qt is a Programming Language, maybe this was already discussed, hard to know when topic has 300+ posts...
                                It looks like the OP never created a new thread and asked all his questions in the same one.

                                M Offline
                                M Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on 24 Jul 2019, 11:54 last edited by
                                #309

                                @LeLev
                                Hi
                                She is using a screen reader so I think its easier for her to use the same thread.

                                O 1 Reply Last reply 24 Jul 2019, 11:56
                                2
                                • M mrjj
                                  24 Jul 2019, 11:54

                                  @LeLev
                                  Hi
                                  She is using a screen reader so I think its easier for her to use the same thread.

                                  O Offline
                                  O Offline
                                  ODБOï
                                  wrote on 24 Jul 2019, 11:56 last edited by
                                  #310

                                  @mrjj ah ok! my bad

                                  1 Reply Last reply
                                  1
                                  • J jsulm
                                    24 Jul 2019, 11:14

                                    @Annabelle Looks good, it works

                                    A Offline
                                    A Offline
                                    Annabelle
                                    wrote on 24 Jul 2019, 12:22 last edited by
                                    #311

                                    @jsulm said in Qt Programming Language:

                                    @Annabelle Looks good, it works

                                    Cool-ee-o! So what do I do next?

                                    aha_1980A 1 Reply Last reply 24 Jul 2019, 12:42
                                    0
                                    • A Annabelle
                                      24 Jul 2019, 12:22

                                      @jsulm said in Qt Programming Language:

                                      @Annabelle Looks good, it works

                                      Cool-ee-o! So what do I do next?

                                      aha_1980A Offline
                                      aha_1980A Offline
                                      aha_1980
                                      Lifetime Qt Champion
                                      wrote on 24 Jul 2019, 12:42 last edited by
                                      #312

                                      @Annabelle: Congrats, your program is compiling and running.

                                      However, it does not seem to output any useful yet.

                                      So the next thing would be to actually make your program to output "Hello World!" (or any other greeting you can think of).

                                      Good luck!

                                      Qt has to stay free or it will die.

                                      A 1 Reply Last reply 24 Jul 2019, 13:13
                                      2
                                      • aha_1980A aha_1980
                                        24 Jul 2019, 12:42

                                        @Annabelle: Congrats, your program is compiling and running.

                                        However, it does not seem to output any useful yet.

                                        So the next thing would be to actually make your program to output "Hello World!" (or any other greeting you can think of).

                                        Good luck!

                                        A Offline
                                        A Offline
                                        Annabelle
                                        wrote on 24 Jul 2019, 13:13 last edited by
                                        #313

                                        @aha_1980 said in Qt Programming Language:

                                        @Annabelle: Congrats, your program is compiling and running.

                                        However, it does not seem to output any useful yet.

                                        So the next thing would be to actually make your program to output "Hello World!" (or any other greeting you can think of).

                                        Good luck!

                                        Isn't that what the line, "std::cout << "Hello, World!"; is supposed to do? I'm confused!

                                        aha_1980A J 2 Replies Last reply 24 Jul 2019, 13:21
                                        0
                                        • A Annabelle
                                          24 Jul 2019, 13:13

                                          @aha_1980 said in Qt Programming Language:

                                          @Annabelle: Congrats, your program is compiling and running.

                                          However, it does not seem to output any useful yet.

                                          So the next thing would be to actually make your program to output "Hello World!" (or any other greeting you can think of).

                                          Good luck!

                                          Isn't that what the line, "std::cout << "Hello, World!"; is supposed to do? I'm confused!

                                          aha_1980A Offline
                                          aha_1980A Offline
                                          aha_1980
                                          Lifetime Qt Champion
                                          wrote on 24 Jul 2019, 13:21 last edited by
                                          #314

                                          Hi @Annabelle,

                                          Isn't that what the line, "std::cout << "Hello, World!"; is supposed to do? I'm confused!

                                          Yes, it is. Do you have this output somewhere on your screen? In the screenshots you provided, I didn't see it.

                                          If you already have that, then the next steps could be:

                                          1. Print "Hello World" ten times, with an upcounting number appended, like:
                                          Hello World 1
                                          Hello World 2
                                          Hello World 3
                                          ...
                                          Hello World 10
                                          
                                          1. Ask the user for his name, and greet him. That could look like this:
                                          Hello, what's your name?
                                          Luke
                                          Nice to meet you, Luke!
                                          

                                          That would then almost be a complete program, taking an input and providing an output. Only the data processing is missing - but we can add that later.

                                          Regards

                                          Qt has to stay free or it will die.

                                          1 Reply Last reply
                                          2

                                          304/331

                                          24 Jul 2019, 01:30

                                          • Login

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