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. OSX: Qt Creator 4.8
Forum Updated to NodeBB v4.3 + New Features

OSX: Qt Creator 4.8

Scheduled Pinned Locked Moved General and Desktop
15 Posts 7 Posters 9.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.
  • O Offline
    O Offline
    OSXBiased
    wrote on last edited by
    #1

    After install, an attempt to compile a simple sample application:

    "error: g++-4.2: No such file or directory"

    A bit ironic since the installer goes to a ton of work to download several different packages only for the end result to be an incomplete installation.

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

      That is a bug in the compile toolchain detection code. We were able to work around it by switching to the clang toolchain.

      The Qt Creator installation is complete, the compiler is part of Xcode. g++-4.2 exists in /usr/bin if you have Xcode for OSX 10.6 installed. It is usually not installed on 10.7.

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

      1 Reply Last reply
      0
      • O Offline
        O Offline
        OSXBiased
        wrote on last edited by
        #3

        Thanks for the reply. Yeah, I'm running 10.7.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          RickF
          wrote on last edited by
          #4

          Same error here, wasted a lot of time trying to get Qt Creator to build.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            It would rock if somebody could check whether http://codereview.qt-project.org/#change,11297 fixes this issue.

            As a work-around you can either create a symlink in /usr/bin from g++/gcc to g++-4.2/gcc-4.2 or change the mkspec used in the Project settings (Project->Build Settings->qmake step).

            Originally we just used the un-versioned mkspec, but that got me quite a few bug reports when people were using older xcode versions to write software that worked well on all the older Mac OS X boxes out there. Nobody reported this breaking in Mac OS X 10.7 with a new Xcode till after the release:-( Sorry for the inconvenience.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              GabeU
              wrote on last edited by
              #6

              how to modify the mkspec used in the Project settings...because i cannot change that.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tobias.hunger
                wrote on last edited by
                #7

                Just add "-spec macx-gcc" into the "Additional arguments" field of the qmake step (click "Details" to show it!).

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  GabeU
                  wrote on last edited by
                  #8

                  Thanks it worked if i added "-spec macx-g++" and i had to modify the qglobal.h to make 10.7 a supported OS

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

                    Wait wait wait, don't edit qglobal.h :-) Mac Os 10.7 is not a (fully) supported platform of Qt 4.7. You should stick to the Mac Os 10.6 SDK. Simply add a deployment target to your QMake project like this:

                    macx:QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.6.sdk

                    This makes the warning message go away, and is actually closer to reality :-)

                    Cheers,

                    Mirko.

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

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      GabeU
                      wrote on last edited by
                      #10

                      i did that and the warning message did not go away but the app worked.

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        Mitomedia
                        wrote on last edited by
                        #11

                        Hi Miroslav,

                        I am trying out Qt for the very first time and I am working on OSX 10.7.2 and have Xcode 4.2 installed. While I have programming experience, I am pretty new to C++ development and I was wondering, if you could explain a little bit more in detail how I need to configure Qt in order to make it work. I am not sure where I have to make the changes that you explained in this post and would appreciate your help greatly. Thanks, Michael

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          makellos
                          wrote on last edited by
                          #12

                          Hi, I am having this same problem. I went into projects, changed the toolchain to clang++, and I receive the same error that g++-4.2: no such file or directory found.

                          I also tried adding "-spec macx-g++" and "-spec macx-gcc" in all variations to the qmake.

                          I have /usr/bin/gcc, /usr/bin/g++, Developer/usr/bin/gcc, and /Developer/usr/bin/g++

                          I am running macos 10.7.1 and qt creator 4.7.4

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            tobias.hunger
                            wrote on last edited by
                            #13

                            Please make sure that qmake is rerun after changing the spec parameter. QMake generates the makefiles used to build the project and if it is not rerun then you will still have the old ones which refer to g++-4.2.

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

                              How do you rerun qmake? I don't see any options to do this.

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                tobias.hunger
                                wrote on last edited by
                                #15

                                Build->Run Qmake or Build->Rebuild Project X or Build->Clean Project X followed by a normal build should all trigger qmake to be rerun.

                                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