Important: Please read the Qt Code of Conduct -

[SOLVED] Error while building project ...

  • Good Day!
    Need advice.
    I use Qt 4.6.3 on Hackintosh 10.5.7.
    When my project is builded, I have next output:

    Running build steps for project qtGuiApp...
    Starting: /usr/bin/qmake /Users/alexander/Qt/qtGuiApp/ -spec macx-g++ -r
    Exited with code 0.
    Starting: /usr/bin/make -w
    make: Entering directory /Users/alexander/Qt/qtGuiApp' g++ -c -pipe -g -gdwarf-2 -arch i386 -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I. -F/Library/Frameworks -o main.o main.cpp make: g++: Command not found make: *** [main.o] Error 127 make: Leaving directory/Users/alexander/Qt/qtGuiApp'
    Exited with code 2.
    Error while building project qtGuiApp
    When executing build step 'Make'

    How I can configure build environment?

  • Have you installed g++?

  • Yes.
    but, also have:
    /Developer/usr/bin/llvm-g++ -> ../llvm-gcc-4.2/bin/llvm-g++-4.2
    /Developer/usr/bin/llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/llvm-g++-4.2
    /Developer/usr/bin/powerpc-apple-darwin9-llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/powerpc-apple-darwin9-llvm-g++-4.2

  • /usr/bin/g++ and /Developer/usr/bin/g++ are missing (both are symlinks).

  • So you don't have a pure /usr/bin/g++ executable. Try to make a symbolic link of the latest g++ you have installed and call it simply g++, i.e.

    ln -s /path/to/latest/g++ /usr/bin/g++

  • After edit link:
    /Library/Frameworks/QtCore.framework/Headers/qglobal.h:306:34: error: AvailabilityMacros.h: No such file or directory
    /Library/Frameworks/QtCore.framework/Headers/qbytearray.h:48:20: error: string.h: No such file or directory
    /Library/Frameworks/QtCore.framework/Headers/qlist.h:50:20: error: iterator: No such file or directory
    /Library/Frameworks/QtCore.framework/Headers/qlist.h:51:16: error: list: No such file or directory
    /Library/Frameworks/QtCore.framework/Headers/qlist.h:54:15: error: new: No such file or directory
    In file included from /Library/Frameworks/QtGui.framework/Headers/qbrush.h:47,

    /Library/Frameworks/QtCore.framework/Headers/qvector.h:52:18: error: vector: No such file or directory
    /Library/Frameworks/QtCore.framework/Headers/qvector.h:54:20: error: stdlib.h: No such file or directory
    /Library/Frameworks/QtCore.framework/Headers/qbytearray.h: In function 'uint qstrlen(const char*)':
    /Library/Frameworks/QtCore.framework/Headers/qbytearray.h:68: error: 'strlen' was not declared in this scope
    /Library/Frameworks/QtCore.framework/Headers/qbytearray.h: In function 'int qstrncmp(const char*, const char*, uint)':
    Total 513 errors!, dependencies from unfounded files.
    I found this files at /Developer/SDKs/MacOSX10.5.sdk/usr/include/.
    I added this path to PATH variable of the build environment, but result is same.
    Is this path correct?

  • Seems that you do not have a standard development environment setup. Something must be screwed up. XCode normally sets up these things automatically.

  • I decided my problem of error build process.
    All is simply, one of packages of the iPhone SDK has been crashed while validate and installation process has not been fully finished.
    Because of this, I had not fully configured system environment (Volker, you were right!). For the iPhone SDK this package is not very important and native XCode project was built successfully. But for the Qt SDK is not so.
    I needed new XCode or missing broken package.
    Thank you all!

  • Well what happens in these cases for Mac, if I install QT and do not have any version of Xcode 4.2 before complains that there is a g + + -4.2. An Qt example, if I format my computer, put the LION MAC OS and install Xcode 4.1 or 4.2 and see for example install qt 4.7.4 to compile a QT blames this error gcc. So it is okay to install Xcode for Mac OS 10.6 for it to compile gcc + + 4.2 after you install version 4.2 for example, of course without uninstalling the previous XCode.
    Well I know that it is not because it's a discução HAKINTOSH, most can be doubt of a future or who are in difficulty.



  • its a bug of QT !!! Any question please speak!!!!

  • I don't understand completely what you've done. As an additional question: are you on OX 10.7 or a previous version?

  • I have MAC OS 10.7, it does not matter anymore ...
    what happens is with the version of Xcode with QT.
    I need Xcode installed 6.10 because of the GCC + + -4.2 or anything.
    Here is an example ... If I format my Mac, and I did not install Xcode for Mac OS 10.6 .... If I update straight to 4.2 XOCODE an error occurs while compiling my applications on the QT ... but if I compile something in XCode any version that compiles with no problem ...

    The steps are to primeiratamente before doing anything.

    If I have MAC OS 10.6 or 10.7:

    First - install Xcode for Mac OS Snow Leopard.
    because of GCC + +.
    Second - install Xcode 4.2.
    third - install QT.

    If you have the 10.5 install xcode referring to vesa in order to load the appropriate libs.

    But if you use Xcode will compile your programs normally.
    The problem and the QT, that is a bug with Qt as I said, that after compiling the information that is missing gcc plus plus.

    Do u understand now Volker?
    If u have a question , please speak !!!!


  • Volker !

    Are u on Mac os Lion?

  • I'm still on Snow Leo (10.6) with XCode 3.5. AFAIK there have been some problems with XCode 4 and Qt, I'm not sure if and when that has been sorted out.

  • What is the problem??
    Please specify!

    Im on Mac OS Lion , Xcode 4.2 and Qt 4.7.4 and i don't have any problem !!!!

    tell me, what the problem !!!

  • ?

  • I don't have a problem. But you do have one, according to your 4th previous post from here and none to the 2nd last. At least you have problem finding out whether you have a problem....

    Otherwise, why do you wake up an almost 9 months old thread?

  • I do not have any problem, you actually have to adapt to changes and found them, that is great satisfaction in the program. I had difficulties at first with MAC LION, with XCode and QT longer figured out how to solve this. I put a post about that problem of architecture, in fact it is a bug in QT too.
    If you want to sync your MAC LION, with Xcode 4.2 and its QT can help you in some respects, however, this is working perfectly on my computer.

Log in to reply