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. Assistance with setting up Qt with my Mac?

Assistance with setting up Qt with my Mac?

Scheduled Pinned Locked Moved Installation and Deployment
20 Posts 3 Posters 5.5k 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.
  • J Offline
    J Offline
    JonathanAV95
    wrote on last edited by
    #9

    [quote author="SGaist" date="1415652772"]Which version of Qt did you install ?[/quote]

    Actually, i enable the hidden folder and managed to get .profile
    which i then added the environment variable.

    However, i cant find the folder TrollTech that the environment variable says.
    Also i'm using the latest Qt for Mac, since i just downloaded the dmg today and made sure i used the latest which i dont know by hear (above 5 surely)!
    I just installed it and thats it, i then got a Qt folder in the hard drive but i dont know were else to go with it? do i have to do this to fullfill the installation?

    http://qt-project.org/doc/qt-4.8/install-mac.html

    To configure the Qt library for your machine type, run the ./configure script in the package directory.
    By default, Qt is configured for installation in the /usr/local/Trolltech/Qt-4.8.6 directory, but this can be changed by using the -prefix option.
    cd /tmp/qt-everywhere-opensource-src-4.8.6
    ./configure
    Type ./configure -help to get a list of all available options.
    Note that you will need to specify -universal if you want to build universal binaries, and also supply a path to the -sdk option if your development machine has a PowerPC CPU. By default, Qt is built as a framework, but you can built it as a set of dynamic libraries (dylibs) by specifying the -no-framework option.
    Qt can also be configured to be built with debugging symbols. This process is described in detail in the Debugging Techniques document.
    To create the library and compile all the demos, examples, tools, and tutorials, type:
    make
    If -prefix is outside the build directory, you need to install the library, demos, examples, tools, and tutorials in the appropriate place. To do this, type:
    sudo make -j1 install
    This command requires that you have administrator access on your machine.
    Note: There is a potential race condition when running make install with multiple jobs. It is best to only run one make job (-j1) for the install.
    If you later need to reconfigure and rebuild Qt from the same location, ensure that all traces of the previous configuration are removed by entering the build directory and typing make confclean before running configure again.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #10

      If you downloaded the latest Qt version it should be something like 5.3.X or 5.4 if you got the beta.

      You are following the 4.8 documentation, which is not completely valid for the 5.X series.

      Anyway, you can use Spotlight to find the exact position of qmake

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JonathanAV95
        wrote on last edited by
        #11

        [quote author="SGaist" date="1415656599"]If you downloaded the latest Qt version it should be something like 5.3.X or 5.4 if you got the beta.

        You are following the 4.8 documentation, which is not completely valid for the 5.X series.

        Anyway, you can use Spotlight to find the exact position of qmake[/quote]

        I have the 5.3 so what do i need to do? What do i personally need to follow to make sure that Qt is fully installed and ready to be used?

        Also i opened a terminal and "cd" to the folder that contains the main.cpp for the projects i want to use with Qt.

        When i do the qmake, i get the problem that its supposibly not working!

        What can i do?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #12

          What I already wrote: call qmake with the absolute path to it e.g.

          @/usr/local/Qt/5.3.1/bin/qmake@

          Or something like that. You can easily find qmake using spotlight

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JonathanAV95
            wrote on last edited by
            #13

            [quote author="SGaist" date="1415752681"]What I already wrote: call qmake with the absolute path to it e.g.

            @/usr/local/Qt/5.3.1/bin/qmake@

            Or something like that. You can easily find qmake using spotlight[/quote]

            i get tons of qmake lol literally, i hate the Qt folder which has this:
            Qt > 5.3 >
            android_armv7
            clang_64
            ios
            Src

            Then each one of those folder have theyre own qmake, so in reality which one do i choose? i know i dont use ios or android since im building for desktop, so would i get clang or Src? Also if i choose src, what folder in Src do i choose? I have a bunch of folders starting with Qt....

            Sorry for all the dumb questions, i dont know about this and what might be simple for you guys might be a bit confusing for me! I appreciate all the help !

            So to clarify, i open up Terminal, then "sudo cd" into the directory were qmake is found in, correct? Once in there, i run the codes:
            qmake -project
            qmake -spec macx-xcode
            make

            However, my other question is, would i need to also insert the location of the folder were i'll be creating the program?

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

              No need to use sudo. And you should cd into your project directory, not qmake dir. You should use qmake from clang_64 folder, like this:
              @
              cd /your/project/directory
              /Qt/5.3/clang_64/bin/qmake -project
              /Qt/5.3/clang_64/bin/qmake -spec macx-xcode
              make
              @

              (Z(:^

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JonathanAV95
                wrote on last edited by
                #15

                [quote author="sierdzio" date="1415775064"]No need to use sudo. And you should cd into your project directory, not qmake dir. You should use qmake from clang_64 folder, like this:
                @
                cd /your/project/directory
                /Qt/5.3/clang_64/bin/qmake -project
                /Qt/5.3/clang_64/bin/qmake -spec macx-xcode
                make
                @[/quote]

                Wow thats remarkably really straightforward lol, never knew that it was that simple! I guess i was simply been overwelmed by the tons of files!

                anyways when i call the qmake -project i get this error:

                Project ERROR: Could not resolve SDK path for 'macosx10.8'

                I'm guessing that Qt SDK is not properly linked to the macosx10.8, or what could it be specifically?

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  JonathanAV95
                  wrote on last edited by
                  #16

                  [quote author="sierdzio" date="1415775064"]No need to use sudo. And you should cd into your project directory, not qmake dir. You should use qmake from clang_64 folder, like this:
                  @
                  cd /your/project/directory
                  /Qt/5.3/clang_64/bin/qmake -project
                  /Qt/5.3/clang_64/bin/qmake -spec macx-xcode
                  make
                  @[/quote]

                  Wow thats remarkably really straightforward lol, never knew that it was that simple! I guess i was simply been overwelmed by the tons of files!

                  anyways when i call the qmake -project i get this error:

                  Project ERROR: Could not resolve SDK path for 'macosx10.8'

                  I'm guessing that Qt SDK is not properly linked to the macosx10.8, or what could it be specifically?

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

                    You're on Qt 4.8.6, right? It does not know about OS X 10.10, so I guess that is the problem. Check in Xcode, whether that SDK version is installed (and if it is still available at all).

                    (Z(:^

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #18

                      Qt's properly linked, the thing is that the latest version of Xcode doesn't provide that SDK anymore.

                      IIRC, you only need to update the macx-clang mkspec to use the one you get with your version of Xcode

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        JonathanAV95
                        wrote on last edited by
                        #19

                        [quote author="SGaist" date="1415830510"]Qt's properly linked, the thing is that the latest version of Xcode doesn't provide that SDK anymore.

                        IIRC, you only need to update the macx-clang mkspec to use the one you get with your version of Xcode[/quote]

                        What do you mean? i have the latest Qt 5.3 sdk and xCode 6 so is there something i need to do specifically to be able to get what i need working already?

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

                          SGaist means you may need to modify macx-clang mkspecs (it's a folder inside Qt installation, which holds build configurations for different platforms) so that Qt knows about this new SDK.

                          (Z(:^

                          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