PDA

View Full Version : Using Qt Creator on MacOSX Lion with Xcode 4.3



hickscorp
8th April 2012, 21:46
Hello,

i'm trying to set up Qt on my Mac using the SDK offline installer.
So far so good, i had Qt creator installed, as well as the desktop SDK (Not including any source as i don't need them).
However, when going to Qt Creator properties, i noticed there were no toolchains found.
i have tried to set up a toolchain (GCC based, then Clang based) with no luck.
With an empty project created with Qt Creator, i always get the message ":-1: error: Qt Creator needs a tool chain set up to build. Configure a tool chain in Project mode.".
i'm wondering... Are the toolchain paths hard-coded in Qt Creator? i used an un-usual installation path for my XCode.app, in /Applications/Dev instead of /Applications... So the toolchain is in /Applications/Dev/XCode.app/Contents/Developer/usr/bin.
Or maybe is it because of the recent switch from GCC to LLVM?

Thanks for any help you might provide.
Pierre.

EDIT: i'm a bit further into the process, and have a different problem.
In Qt Creator, i have manually set a CLang toolchain to the path "/Applications/Dev/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang".
After series of trial - error, i also have found that make isn't in my PATH (Maybe installing XCode command line toolchain would help... But i can't), so i have overrode make path in my build settings (Projects tab in Qt Creator, Build Steps) to /Applications/Dev/Xcode.app/Contents/Developer/usr/bin/make.

Now, it seems the compiler cranks up some juice, but i now get this error messge "/Applications/Dev/Qt/Desktop/Qt/4.8.0/gcc/include/QtCore/qglobal.h:68: error: 'algorithm' file not found
#include <algorithm>
^"
It looks to me that i'm maybe missing an include path... But again, it's on a test project i freshly created with Creator. This file is part of the STL, right? It's located here on my setup: /Applications/Dev/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/algorithm.
Where would i configure the global include paths on Qt Creator please?

Any help please?
Thank you,
Pierre.

EDIT2: After manually installing the so called "Command Line Tools" (Not bundled anymore with Xcode 4.3), and running a Qt Creator toolchain detection cycle, everything works. i'm still a bit confused, because the "Command Line Tools" Mac OSX package is simply a copy of the compiler and toolchain, so i really don't understand why Qt Creator doesn't find the original one bundled with Xcode. If anyone knows how to tell Qt Creator how to use the default one, please, i'd be glad to test.

Thanks anyways,
Pierre.

dcole
12th July 2012, 02:34
Hello,
I just wanted to let you know that I am having the same issue, and it wasnt your imagination. I couldnt ever figure out a way to get my toolchain back (was looking for the cmake generator). I thought it was a path issue as well so I added it and had no luck. This all happened after I had to do a system restore and upgrade to Lion.

I finally pulled the latest Xcode, then I had to download the Command Line tools. Now I am back with a full tool chain showing up, but a bunch of my system librarie includes throw compile errors now. Any ideas?