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. [SOLVED] Error "You need a C++ compiler..." when installing Qt SDK on Mac
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Error "You need a C++ compiler..." when installing Qt SDK on Mac

Scheduled Pinned Locked Moved Qt Creator and other tools
20 Posts 5 Posters 13.9k 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #3

    Ah, I forgot - it's also possible, that you have to set your xcode folder with xcode-select. Best option: do both :)

    (Z(:^

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wayfaerer
      wrote on last edited by
      #4

      I ran terminal, and set the path using:

      sudo xcode-select -switch /Applications/Developer

      and it was successful (I think). But I tried to install the Qt SDK again and got the same error! Any other ideas?

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #5

        Are you able to compile other, non-Qt code?

        (Z(:^

        1 Reply Last reply
        0
        • W Offline
          W Offline
          wayfaerer
          wrote on last edited by
          #6

          Yep, I just opened XCode, created a C++ console project, and built Hello World successfully.

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #7

            I mean compile in terminal. Xcode is probably setting up the environment in the background.

            (Z(:^

            1 Reply Last reply
            0
            • W Offline
              W Offline
              wayfaerer
              wrote on last edited by
              #8

              Yeah, Terminal doesn't work. I think I misunderstood your first reply. When you said "command line tools" I thought you were talking about Terminal, since I tried searching the Mac app store for command line tools and didn't find anything. But now I realize it's just an add-on. I'll try installing it.

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #9

                Yeah, those tools are not in App Store, they have to be downloaded separately. Okay then, maybe this time it works.

                (Z(:^

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  wayfaerer
                  wrote on last edited by
                  #10

                  That did the trick. Thanks, I really appreciate your help.

                  1 Reply Last reply
                  0
                  • sierdzioS Offline
                    sierdzioS Offline
                    sierdzio
                    Moderators
                    wrote on last edited by
                    #11

                    You're welcome :) Just to fulfill the bureaucracy, please add "[Solved]" to the beginning of the subject of this topic. I've already tagged it accordingly.

                    (Z(:^

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      AndrewW
                      wrote on last edited by
                      #12

                      [quote author="wayfaerer" date="1335805077"] … I tried searching the Mac app store for command line tools and didn't find anything. But now I realize it's just an add-on. I'll try installing it.[/quote]

                      I'm glad that solved solved the problem!
                      Can you let me in on the secret of where to get these tools? I hope that I don't have to download Xcode again - that took nearly a day out here.

                      Dumb question. See the very first reply!!!!!

                      1 Reply Last reply
                      0
                      • sierdzioS Offline
                        sierdzioS Offline
                        sierdzio
                        Moderators
                        wrote on last edited by
                        #13

                        In new Xcode releases (>= 4.3) cmd line tools can be installed through Xcode Preferences window (although getting the package from dev page is still OK and valid ;)).

                        (Z(:^

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          miroslav
                          wrote on last edited by
                          #14

                          For more details: http://www.agile-workers.com/web/2012/03/qt-qmake-osx_sdk-xcode

                          Mirko Boehm | mirko@kde.org | KDE e.V.
                          FSFE Fellow
                          Qt Certified Specialist

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            gustavosooeiro
                            wrote on last edited by
                            #15

                            Please help!

                            I have done all the steps here, but I still get the same error.
                            Does anyone can please help?!
                            I have been stuck on a couple of days with it ...

                            Thanks

                            1 Reply Last reply
                            0
                            • sierdzioS Offline
                              sierdzioS Offline
                              sierdzio
                              Moderators
                              wrote on last edited by
                              #16

                              Best way is of course to get a real OS like Linux or even Windows, if you feel masochistic.

                              Sorry, couldn't stop myself, but I don't like Mac OS. Jokes aside now, and onto your question: I think we need a bit more data. What have you set xcode-select path to? Which version of Xcode are you using (and which MacOS)? Is the situation the same as for wayfaerer, that is - Xcode compilation works, but command line fails?

                              (Z(:^

                              1 Reply Last reply
                              0
                              • G Offline
                                G Offline
                                gustavosooeiro
                                wrote on last edited by
                                #17

                                Yes, I think you are right. I might stick with Ubuntu to develop in C++.

                                I am still fighting with MacOS because I have a lot of friends that love Xcode, so I am still giving a try. But eventually (very soon) I might abandon MacOS for that!! :)

                                I am using Lion, and Xcode 4.4 with command line installed. I used the command:
                                sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

                                As I don't have experience with Xcode so I am not using it. I just wrote a little program using vi and complied using g++ and c++, through Terminal program.

                                This command line should be used inside XCode?

                                There is still hope for me? :0)

                                Thanks a lot!

                                1 Reply Last reply
                                0
                                • sierdzioS Offline
                                  sierdzioS Offline
                                  sierdzio
                                  Moderators
                                  wrote on last edited by
                                  #18

                                  Hm, so standard compilation works, yet you still can't install the SDK? I'm out of ideas, apart from one workaround: install Qt libraries and QtCreator separately, without using the SDK.

                                  (Z(:^

                                  1 Reply Last reply
                                  0
                                  • sierdzioS Offline
                                    sierdzioS Offline
                                    sierdzio
                                    Moderators
                                    wrote on last edited by
                                    #19

                                    Oh, and be sure to use 4.8.2, as makespecs for xcode are not working with 4.8.1.

                                    (Z(:^

                                    1 Reply Last reply
                                    0
                                    • G Offline
                                      G Offline
                                      gustavosooeiro
                                      wrote on last edited by
                                      #20

                                      Ok Gene! Thanks! I will follow your suggestion!

                                      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