[SOLVED] Error "You need a C++ compiler..." when installing Qt SDK on Mac
-
Install command line tools in addition to Xcode. I'm not an expert on mac, myself, but it might help. They are available (as a single package) on Apple's developer page.
-
Ah, I forgot - it's also possible, that you have to set your xcode folder with xcode-select. Best option: do both :)
-
Are you able to compile other, non-Qt code?
-
I mean compile in terminal. Xcode is probably setting up the environment in the background.
-
Yeah, Terminal doesn't work. I think I misunderstood your first reply. When you said "command line tools" I thought you were talking about Terminal, since I tried searching the Mac app store for command line tools and didn't find anything. But now I realize it's just an add-on. I'll try installing it.
-
Yeah, those tools are not in App Store, they have to be downloaded separately. Okay then, maybe this time it works.
-
You're welcome :) Just to fulfill the bureaucracy, please add "[Solved]" to the beginning of the subject of this topic. I've already tagged it accordingly.
-
[quote author="wayfaerer" date="1335805077"] … I tried searching the Mac app store for command line tools and didn't find anything. But now I realize it's just an add-on. I'll try installing it.[/quote]
I'm glad that solved solved the problem!
Can you let me in on the secret of where to get these tools? I hope that I don't have to download Xcode again - that took nearly a day out here.Dumb question. See the very first reply!!!!!
-
In new Xcode releases (>= 4.3) cmd line tools can be installed through Xcode Preferences window (although getting the package from dev page is still OK and valid ;)).
-
For more details: http://www.agile-workers.com/web/2012/03/qt-qmake-osx_sdk-xcode
-
Please help!
I have done all the steps here, but I still get the same error.
Does anyone can please help?!
I have been stuck on a couple of days with it ...Thanks
-
Best way is of course to get a real OS like Linux or even Windows, if you feel masochistic.
Sorry, couldn't stop myself, but I don't like Mac OS. Jokes aside now, and onto your question: I think we need a bit more data. What have you set xcode-select path to? Which version of Xcode are you using (and which MacOS)? Is the situation the same as for wayfaerer, that is - Xcode compilation works, but command line fails?
-
Yes, I think you are right. I might stick with Ubuntu to develop in C++.
I am still fighting with MacOS because I have a lot of friends that love Xcode, so I am still giving a try. But eventually (very soon) I might abandon MacOS for that!! :)
I am using Lion, and Xcode 4.4 with command line installed. I used the command:
sudo xcode-select -switch /Applications/Xcode.app/Contents/DeveloperAs I don't have experience with Xcode so I am not using it. I just wrote a little program using vi and complied using g++ and c++, through Terminal program.
This command line should be used inside XCode?
There is still hope for me? :0)
Thanks a lot!
-
Hm, so standard compilation works, yet you still can't install the SDK? I'm out of ideas, apart from one workaround: install Qt libraries and QtCreator separately, without using the SDK.
-
Oh, and be sure to use 4.8.2, as makespecs for xcode are not working with 4.8.1.
-
Ok Gene! Thanks! I will follow your suggestion!