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. How to create a correct project with xcode 3.1.3
Forum Updated to NodeBB v4.3 + New Features

How to create a correct project with xcode 3.1.3

Scheduled Pinned Locked Moved General and Desktop
16 Posts 2 Posters 7.6k 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
    julio jerez
    wrote on last edited by
    #7

    I am going out of my mind here, I cannot figure out how qmake works, I made a .pro file like this

    bq. TEMPLATE = app
    CONFIG -= moc
    DEPENDPATH += .
    INCLUDEPATH += .
    SOURCES += main.cpp

    then I run this command:

    qmake -spec mac-xcode project.pro

    but all I get is this errors.

    bq. julio-jerezs-mac-pro:OS10.6-xcode3.2.5 juliojerez$ qmake -spec mac-xcode project.pro
    Could not find mkspecs for your QMAKESPEC(mac-xcode) after trying:
    /usr/local/Qt4.7/mkspecs
    Error processing project file: project.pro
    julio-jerezs-mac-pro:OS10.6-xcode3.2.5 juliojerez$

    please what I am doing so wrong?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      julio jerez
      wrote on last edited by
      #8

      Now when I click on the projrct.pro file it automatically open QTCreator

      bu ther when I try tp build the projetc I get this criptic message than mean zero to me.
      bq. Could not find make command: make in the build environment
      Error while building project project (target: Desktop)
      When executing build step 'Make'

      does Qt works at all on Mac osx?
      or am I wasting my time?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        julio jerez
        wrote on last edited by
        #9

        well I pasted the error code in google, and I found that there thousands of people having the same problem.

        It appears that GCC 4.2 does not work with the version of SDT the xcode uses.
        this is the error in case anyone want to follow:

        error: current namespace 'std' does not enclose strongly used namespace '__gnu_debug_def'

        I switch to GCC 4.0 in xcode and now the compile pass that point, I get other errors but I believe those are on my side.
        If this is true wonder how such blonder can pass in a company like Apple.

        anyway I hope this is my last problem with this
        Thank you

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

          The correct call for qmake to generate an XCode project file is

          @
          qmake -spec macx-xcode project.pro
          @

          notice it's macx not, mac before the -xcode.

          http://www.catb.org/~esr/faqs/smart-questions.html

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

            Yes thank I saw that, I end up using QT creator to create a sample project and I add the a qmake target, with those parameters

            qmake -spec macx-xcode project.pro

            I created the xcode project and I got the same errors again,
            it is not until I select GCC 4.0 in xcode that everything works fine

            anyway I have my project compiling and linking now,
            that was my major problem, I do not have to be a complete expert I only need to provide working demo, Qt is an excellent tool for that.
            I have spent years learning different GUI, with very bad result.

            The only one I found that is bug free is MFC, but it has the bug problem of portability.
            I always was scare of Qt because of the size and because licensing conflict with my products.

            But since I decide to open source my product I took a look at Qt and to my delight this is by far the best GUI library I ever used. Clean Interface, well documented, and easy to used, excellent look across platform and so far for me it supports all eh feature I need.
            I know I had being asking lot of questions, but that because of eh size of the API, but I am very, very satisfied with Qt.

            Thank you for all the help you’d provided.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              julio jerez
              wrote on last edited by
              #12

              well now I am having linking problems
              but I do no know why is this

              these are some of them

              @ cd /Users/juliojerez/Desktop/newton-dynamics/applications/newtonDemos/projects/mac/OS10.6-xcode3.2.5
              setenv MACOSX_DEPLOYMENT_TARGET 10.5
              ld warning: in /Xcode3.1.3/SDKs/MacOSX10.5.sdk/Library/Frameworks//QtCore.framework/QtCore, missing required architecture ppc in file
              ld warning: in /Xcode3.1.3/SDKs/MacOSX10.5.sdk/Library/Frameworks//QtGui.framework/QtGui, missing required architecture ppc in file
              ld warning: in /Xcode3.1.3/SDKs/MacOSX10.5.sdk/Library/Frameworks//QtOpenGL.framework/QtOpenGL, missing required architecture ppc in file
              ld warning: in /Users/juliojerez/Desktop/newton-dynamics/packages/projects/mac/dScene/build/Debug/libdScene_d.a, file is not of required architecture
              ld warning: in /Users/juliojerez/Desktop/newton-dynamics/packages/projects/mac/dMath/build/Debug/libdMath_d.a, file is not of required architecture
              ld warning: in /Users/juliojerez/Desktop/newton-dynamics/packages/projects/mac/tinyxml/build/Debug/libtinyxml_d.a, file is not of required architecture
              ld warning: in /Users/juliojerez/Desktop/newton-dynamics/packages/projects/mac/dContainers/build/Debug/libdContainers_d.a, file is not of required architecture
              Undefined symbols:
              "QFileDialog::getOpenFileName(QWidget*, QString const&, QString const&, QString const&, QString*, QFlagsQFileDialog::Option)", referenced from:
              newtonDemos::OnLoad() in NewtonDemos.o
              "QDialog::keyPressEvent(QKeyEvent*)", referenced from:
              vtable for SelectThreadCountin NewtonDemos.o
              "QAbstractSlider::setMaximum(int)", referenced from:
              SelectThreadCount::SelectThreadCount(DemoEntityManager*)in NewtonDemos.o
              "QWidget::mouseReleaseEvent(QMouseEvent*)", referenced from:
              vtable for DemoEntityManagerin DemoEntityManager.o
              vtable for newtonDemosin moc_NewtonDemos.o
              vtable for SelectThreadCountin NewtonDemos.o
              "QObject::qt_metacast(char const*)", referenced from:
              vtable for newtonDemosEventFilterin NewtonDemos.o
              "QWidget::focusOutEvent(QFocusEvent*)", referenced from:
              vtable for DemoEntityManagerin DemoEntityManager.o
              vtable for newtonDemosin moc_NewtonDemos.o
              vtable for SelectThreadCountin NewtonDemos.o
              "dBaseHierarchy::GetNext() const", referenced from:
              SimpleMeshLevel(DemoEntityManager*, bool) in MeshCollision.o
              "QObject::connectNotify(char const*)", referenced from:
              vtable for DemoEntityManagerin DemoEntityManager.o
              vtable for newtonDemosin moc_NewtonDemos.o
              vtable for newtonDemosEventFilterin NewtonDemos.o
              vtable for SelectThreadCountin NewtonDemos.o
              vtable for newtonDemosEventFilterin NewtonDemos.o
              @

              but I added the qt framework to the project.
              what is strange is that I believe I build once but them I save it and clean up the project and now it fail.

              do you know what could this be now?

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

                Oh I see it looks like Qt does not work with G5 powerpc
                only on Intel.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #14

                  Wrong. Qt support ppc and x86 both with 64 and 32 bit. See the "Developing Qt Applications for Mac OS X":http://doc.qt.nokia.com/4.7/developing-on-mac.html for the details which works on Carbon and which on Cocoa.

                  Be aware, that you must tell the compiler to produce fat binaries. You can include this permanently into your .pro file, the page mentioned shows you how.

                  http://www.catb.org/~esr/faqs/smart-questions.html

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

                    But I do have Universal binaries 64 set, the error says that the the Qt Frameworks do not have the PPC,

                    MacOSX10.5.sdk/Library/Frameworks//QtCore.framework/QtCore, missing required architecture ppc in file ld warning: in /Xcode3.1.3/SDKs/MacOSX10.5.sdk/Library/Frameworks//QtGui.framework/QtGui, missing required architecture ppc in file ld warning: in /Xcode3.1.3/SDKs/MacOSX10.5.sdk/Library/Frameworks//QtOpenGL.framework/QtOpenGL, missing required architecture ppc in file

                    It also says the same about my own libraries, which does not makes sence to me since I use them before, Oh man I had never had so much problem with xcode before.

                    But anyway I do not think tshi has anything to do with Qt.

                    Thank you

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #16

                      Then you have the Cocoa version of Qt. As the table on the page I posted clearly indicates, Cocoa + 64 bit PPC is not possible. If you need that, you must stick to Carbon.

                      And this all has nothing to do with XCode. It's irrelevant if you compile on the command line, with Qt Creator or XCode, it's all the same regarding this aspect.

                      http://www.catb.org/~esr/faqs/smart-questions.html

                      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