Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [SOLVED] qtCreator doesn't build my project since I update to Mountain Lion

[SOLVED] qtCreator doesn't build my project since I update to Mountain Lion

Scheduled Pinned Locked Moved Installation and Deployment
38 Posts 12 Posters 34.3k 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.
  • R Offline
    R Offline
    rikytres
    wrote on last edited by
    #1

    Last evening I updated my mac to last MacOs, Mountain Lion, and now I'm trying to build my project, that until last evening worked.

    When I try to run it, qtCreator reports this: "Qt Creator needs a tool chain set up to build. Configure a tool chain in Project mode"

    I "found this page":https://bugreports.qt-project.org/browse/QTBUG-26230?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel here on this forum and I can't understand if my problem is generatetd by this bug, or if I have to setup better the settings.

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

      Do you have compilers installed (AFAIK those come with XCode)?

      Maybe it is just the auto-detection of tool chains that fails. You will need to manually set some up in Tools->Options->Build & Run->Tool Chains.

      I would appreciate if you could report back which gcc/clangs are installed in mountain lion.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rikytres
        wrote on last edited by
        #3

        I have XCode and then i should have all compilers that comes with its.

        I have take a screenshot of my setting of "tool chains". !http://s7.postimage.org/4htmdvrij/qt_Creator_Screen.png()!
        As you can see the the auto-detection found a "Maemo GCC" that works, but the qtVersion tab have some problem...
        !http://s7.postimage.org/tp4ie4umj/qt_Creator_Screen1.png()!
        May be this the problem?

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

          Maemo GCC is used to build for Harmattan devices, so that can not be used for Mac binaries. So if you really have XCode installed, then the auto detection of the tool chains needed to build for Mac is failing.

          Try searching for binaries starting with g++, gcc or clang and add them as a manual tool chains.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            rikytres
            wrote on last edited by
            #5

            I'm gonna try! ;)

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rikytres
              wrote on last edited by
              #6

              Sorry, I'm not very expert... I can't find the path for the g++ compiler in the mac directory...
              Do you know where I can find it?

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rikytres
                wrote on last edited by
                #7

                I found the problem!
                Updating the Os, the g++ and the gcc command (and all other command came from Xcode) was deleted.
                Now I'm re-installing Xcode suit and then I will test again if qtCreator works.

                Fingers crossed!!

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

                  G++ might have been removed in favor of clang/clang++, or for g++-4.x or something similar. Sorry, I don't have a mac available here so I can't check.

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    rikytres
                    wrote on last edited by
                    #9

                    In /usr/bin i can't find any file that contain "g++", "clang" or "gcc" in the name.
                    I think the problem will be resolved only with re-installing xcode...

                    I'm download it and in a few minutes i will do it... ;)

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      rikytres
                      wrote on last edited by
                      #10

                      Ok... I failed again...
                      I found out the g++ and gcc comand in /Developer/usr/bin/ and i set they as manual in tool chains.
                      I set "Compiler path" as /Developer/usr/bin/g++ and "Debugger" as /Developer/usr/bin/g++ too... Is it correct?

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

                        No, the debugger is called gdb. It will most likely be in the same directory as g++.

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          rikytres
                          wrote on last edited by
                          #12

                          And then is somethig like this?
                          Compiler path: /Developer/usr/bin/g++
                          Debugger: /Developer/usr/bin/gdb

                          right?

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            rikytres
                            wrote on last edited by
                            #13

                            I done it and now qtCreator can find the compiler.

                            But now I have an other problem... The compiler can't find the "basics" libraries like <iostream> or <string>.

                            I don't know what i can do...

                            This is the compile output log:

                            08:36:40: Running build steps for project CalcolatriceSensibile...
                            08:36:40: Configuration unchanged, skipping qmake step.
                            08:36:40: Starting: "/Developer/usr/bin/make" -w
                            make: Entering directory /Users/TresMac/Developing Project/C++/CalcolatriceSensibile-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug' g++ -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -I../../../QtSDK/Desktop/Qt/474/gcc/mkspecs/macx-g++ -I../CalcolatriceSensibile -I../../../QtSDK/Desktop/Qt/474/gcc/lib/QtCore.framework/Versions/4/Headers -I../../../QtSDK/Desktop/Qt/474/gcc/include/QtCore -I../../../QtSDK/Desktop/Qt/474/gcc/lib/QtGui.framework/Versions/4/Headers -I../../../QtSDK/Desktop/Qt/474/gcc/include/QtGui -I../../../QtSDK/Desktop/Qt/474/gcc/include -I. -I. -I../CalcolatriceSensibile -I. -F/Users/TresMac/QtSDK/Desktop/Qt/474/gcc/lib -o mainTest.o ../CalcolatriceSensibile/mainTest.cpp In file included from ../CalcolatriceSensibile/logic/point.h:5, from ../CalcolatriceSensibile/mainTest.cpp:2: ../CalcolatriceSensibile/logic/function.h:4:17: error: string: No such file or directory In file included from ../CalcolatriceSensibile/mainTest.cpp:5: ../CalcolatriceSensibile/logic/utilities.h:7:18: error: sstream: No such file or directory ../CalcolatriceSensibile/mainTest.cpp:8:19: error: iostream: No such file or directory In file included from ../CalcolatriceSensibile/logic/point.h:5, from ../CalcolatriceSensibile/mainTest.cpp:2: ../CalcolatriceSensibile/logic/function.h:16: error: 'string' in namespace 'std' does not name a type In file included from ../CalcolatriceSensibile/mainTest.cpp:2: ../CalcolatriceSensibile/logic/point.h:19: error: 'string' in namespace 'std' does not name a type In file included from ../CalcolatriceSensibile/logic/line.h:6, from ../CalcolatriceSensibile/mainTest.cpp:3: ../CalcolatriceSensibile/logic/triangle.h:16: error: 'string' in namespace 'std' does not name a type In file included from ../CalcolatriceSensibile/mainTest.cpp:5: ../CalcolatriceSensibile/logic/utilities.h:17: error: expected constructor, destructor, or type conversion before 'toString' ../CalcolatriceSensibile/mainTest.cpp:10: error: 'std::cout' has not been declared ../CalcolatriceSensibile/mainTest.cpp: In function 'int main()': ../CalcolatriceSensibile/mainTest.cpp:15: error: 'cout' was not declared in this scope ../CalcolatriceSensibile/mainTest.cpp:16: error: 'class function' has no member named 'getExpression' ../CalcolatriceSensibile/mainTest.cpp:26: error: 'endl' is not a member of 'std' make: *** [mainTest.o] Error 1 make: Leaving directory /Users/TresMac/Developing Project/C++/CalcolatriceSensibile-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug'
                            08:36:40: The process "/Developer/usr/bin/make" exited with code 2.
                            Error while building project CalcolatriceSensibile (target: Desktop)
                            When executing build step 'Make'

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              sfilippidis
                              wrote on last edited by
                              #14

                              DISCLAIMER: use at your own risk and don't blame me if this procedure deletes precious files from your machine etc! :-)

                              Let me tell you what I did when updating from Snow Leopard to Mountain Lion:

                              1. Uninstalled Qt SDK using the respective option at SDK's updater.

                              2. Installed the latest XCode from Mac App Store.

                              3. From XCode, from the menu XCode --> Preferences --> Downloads, I downloaded Command Line Tools.

                              4. I reinstalled Qt SDK.

                              https://www.filippidis.name/

                              1 Reply Last reply
                              0
                              • R Offline
                                R Offline
                                rikytres
                                wrote on last edited by
                                #15

                                I decided to do what you suggested... but i start from download last version of Xcode and then download the command line tools...

                                Then I deleted the QtSDK and I'm gonna to re-install it...

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  rikytres
                                  wrote on last edited by
                                  #16

                                  The situation start to be very stressful... -_-
                                  I reinstalled QtCreator, and now QtCreator can see all the compiler.

                                  But...
                                  when I open my project and compile it the compiler return me the follow errors...

                                  ../CalcolatriceSensibile/mainTest.cpp: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
                                  ../CalcolatriceSensibile/mainTest.cpp:16: instantiated from here
                                  ../CalcolatriceSensibile/mainTest.cpp:16: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
                                  ../CalcolatriceSensibile/mainTest.cpp: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
                                  ../CalcolatriceSensibile/mainTest.cpp:16: instantiated from here
                                  ../CalcolatriceSensibile/mainTest.cpp:16: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
                                  ../CalcolatriceSensibile/mainTest.cpp: In instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]':
                                  ../CalcolatriceSensibile/mainTest.cpp:16: instantiated from here
                                  ../CalcolatriceSensibile/mainTest.cpp:16: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
                                  make: *** [mainTest.o] Error 1

                                  I can't understand why this error...

                                  1 Reply Last reply
                                  0
                                  • R Offline
                                    R Offline
                                    rikytres
                                    wrote on last edited by
                                    #17

                                    In particular the compiler give this error three times at the same row's code...

                                    /Users/TresMac/Developing Project/C++/CalcolatriceSensibile-build-desktop-Desktop_Qt_4_7_4_for_GCC__Qt_SDK__Debug/../CalcolatriceSensibile/mainTest.cpp:16: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available

                                    1 Reply Last reply
                                    0
                                    • R Offline
                                      R Offline
                                      rikytres
                                      wrote on last edited by
                                      #18

                                      I found that tis problem come out when i use the operator << with cout on a std:.string variable.

                                      For exemple this code give mi problems:
                                      @#include<string>
                                      #include<iostream>
                                      std::string exemple = "exemple";
                                      std::cout<<exemple;@

                                      1 Reply Last reply
                                      0
                                      • Z Offline
                                        Z Offline
                                        zetavision
                                        wrote on last edited by
                                        #19

                                        I have the same operator << problem. Does Anyone know how to solve it?

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

                                          Yes!!

                                          I had the same problem with the
                                          "explicit instantiation of 'std:basic_ostream<..'"

                                          I tried out the flags that Qt used to compile a simple main routine. Seems it works if you say
                                          -mmacosx-version-min=10.7
                                          instead of
                                          -mmacosx-version-min=10.5

                                          There are no sdks for 10.5 or 10.6 on Mountain Lion and XCode 4.4!

                                          Hope that helped.

                                          cheers,

                                          tim
                                          
                                          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