Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Creator 2.4RC + Qt 4.8RC + OS X 10.6 + Xcode 4.2 = NO GO
stephenju last edited by
I installed the RC versions of the latest Creator 2.4 and Qt 4.8 on OS X 10.6.8 with Xcode 4.2. Now none of the project builds. It looks like some misconfig on the header search paths:
@10:14:39: Running build steps for project t...
10:14:39: Starting: "/usr/bin/qmake-4.8" /Users/stephenchu/t/t.pro -r -spec macx-g++42 CONFIG+=declarative_debug
10:14:39: The process "/usr/bin/qmake-4.8" exited normally.
10:14:39: Starting: "/usr/bin/make" -w
make: Entering directory
/Users/stephenchu/t-build-desktop-Qt_4_8_0__System__Debug' /Developer/Tools/Qt/uic ../t/mainwindow.ui -o ui_mainwindow.h g++-4.2 -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++42 -I../t -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. -I. -I../t -I. -F/Library/Frameworks -o main.o ../t/main.cpp In file included from /usr/include/c++/4.2.1/cstdarg:51, from /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++locale.h:50, from /usr/include/c++/4.2.1/iosfwd:45, from /usr/include/c++/4.2.1/bits/stl_algobase.h:70, from /usr/include/c++/4.2.1/algorithm:65, from /Library/Frameworks/QtCore.framework/Headers/qglobal.h:68, from /Library/Frameworks/QtCore.framework/Headers/qnamespace.h:45, from /Library/Frameworks/QtCore.framework/Headers/qobjectdefs.h:45, from /Library/Frameworks/QtCore.framework/Headers/qobject.h:47, from /Library/Frameworks/QtCore.framework/Headers/qcoreapplication.h:45, from /Library/Frameworks/QtGui.framework/Headers/qapplication.h:45, from /Library/Frameworks/QtGui.framework/Headers/QApplication:1, from ../t/main.cpp:1: /usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory In file included from /usr/include/c++/4.2.1/iosfwd:45, from /usr/include/c++/4.2.1/bits/stl_algobase.h:70, from /usr/include/c++/4.2.1/algorithm:65, from /Library/Frameworks/QtCore.framework/Headers/qglobal.h:68, from /Library/Frameworks/QtCore.framework/Headers/qnamespace.h:45, from /Library/Frameworks/QtCore.framework/Headers/qobjectdefs.h:45, from /Library/Frameworks/QtCore.framework/Headers/qobject.h:47, from /Library/Frameworks/QtCore.framework/Headers/qcoreapplication.h:45, from /Library/Frameworks/QtGui.framework/Headers/qapplication.h:45, from /Library/Frameworks/QtGui.framework/Headers/QApplication:1, from ../t/main.cpp:1: /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++locale.h: In function 'int std::__convert_from_v(int* const&, char*, int, const char*, ...)': /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++locale.h:77: error: 'va_start' was not declared in this scope /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++locale.h:85: error: 'va_end' was not declared in this scope make: *** [main.o] Error 1 make: Leaving directory/Users/stephenchu/t-build-desktop-Qt_4_8_0__System__Debug'
10:14:40: The process "/usr/bin/make" exited with code 2.
Error while building project t (target: Desktop)
When executing build step 'Make'@
The compiler can not find its own stdarg.h? Strange.
alpha_one_x86 last edited by
Here too, but with Qt 4.8 release, + os x 10.6.8 + xcode 4.2.1
Having the same problem now. Has anyone of you solved this problem or filed a bug as reference?
Edit: using the current binary versions of the Qt library and Creator from the download section.
I've got a bad feeling about the compiler delivered by Apple. If i try a simple hello world from a terminal window, it breaks:
std::cout << "Hello, world!" << std:endl;
The output depends the compiler used (Xcode 3.2 = gcc, Xcode4.2 = llvm) but the bottom line is that it can not find the standard c++ library.
If even that does not work I guess QtCreator has a very small chance to suceed :-/
Works in Xcode though. Does anyone know the command line parameters?
No touchdown yet but one step further.
Since compiling of "hello word" works with Xcode I looked at the compiler switches that Apple uses. Then I tried to rebuild that manually and it worked for me
@g++ -x c++ -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64 hello_world.cpp@
The magic seems to be in the @-isysroot /Developer/SDKs/MacOSX10.6.sdk@
Added that to the .pro file
@QMAKE_CXXFLAGS_DEBUG += -isysroot /Developer/SDKs/MacOSX10.6.sdk@
and compiling gets way further but still runs into errors
@21:21:56: Running steps for project TestQt01...
21:21:56: Starting: "/Users/sven/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake" /Users/sven/TestQt01/TestQt01.pro -r -spec macx-g++42 CONFIG+=x86_64 CONFIG+=declarative_debug
21:21:56: The process "/Users/sven/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake" exited normally.
21:21:56: Starting: "/Developer-old/usr/bin/make" -w
make: Entering directory
/Users/sven/TestQt01-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug' g++-4.2 -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o TestQt01.app/Contents/MacOS/TestQt01 main.o mainwindow.o moc_mainwindow.o -F/Users/sven/QtSDK/Desktop/Qt/4.8.1/gcc/lib -L/Users/sven/QtSDK/Desktop/Qt/4.8.1/gcc/lib -framework QtGui -L/usr/local/pgsql/lib -L/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib -F/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib -framework QtCore ld: warning: directory '/usr/local/pgsql/lib' following -L not found make: Leaving directory/Users/sven/TestQt01-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug'
ld: warning: directory '/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib' following -L not found
ld: warning: directory '/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib' following -F not found
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status
make: *** [TestQt01.app/Contents/MacOS/TestQt01] Error 1
21:21:56: The process "/Developer-old/usr/bin/make" exited with code 2.
Error while building/deploying project TestQt01 (target: Desktop)
When executing step 'Make'@
And that's another dead end for me. Any ideas anybody?
(To get that straight: it works on OSX Lion and current Xcode without any modifications but I can not update this machine here and the OSX 10.6.* version should still be supported)
@QMAKE_CXXFLAGS_DEBUG += -isysroot /Developer/SDKs/MacOSX10.6.sdk
QMAKE_CFLAGS_DEBUG += -mmacosx-version-min=10.6
QMAKE_LFLAGS_DEBUG += -mmacosx-version-min=10.6@
to my .pro file helped me to successfully compile a simple Qt project with QtCreator on OSX 10.6.8 and Xcode4.2.
I gues for the release version I will need the respective variables.