Is LLVM the default compiler in Xcode 4? - xcode4

So I just installed Xcode as I registered to dev program so do I actually have to change the compiler from somewhere in Xcode or is LLVM on default? Thanks in advance!

"LLVM GCC 4.2" is the default in the initial 4 release it seems. (i.e.: The LLVM back-end with the GCC 4.2 parser.)
You can verify this by creating a new project, selecting the main project target (the bit at the top of the left hand pane) and then selecting the "Build Settings" option in the main area. If you then select "All" (the default is "Basic") and scroll down, you'll see "LLVM GCC 4.2" selected as the default.
You can of course change this to GCC 4.2 (the Xcode 3.x default) or pure LLVM.
There's a bit more information on the various settings (they're effectively identical to Xcode 3.2.x) in the existing Xcode 3.2.1 GCC CLANG and LLVM demystification question.

Related

g++ is used by qmake and gcc is configured by the kit

"/usr/bin/g++" is used by qmake, but "/usr/bin/gcc" is configured in the kit.
please update your kit of choose a mkspec for qmake that matches your target environment better.
couldn't find any way how to change the complier used by qmake to match the one configured by the kit.
one Tools > Options > Build & Run > kit . there is no way to change the qmake complier back to gcc. and the problem is there is only gcc and clang auto detected by qt 5.9
Tools->Options->build & run->compiler has the settings you need to fix that,
or add new kit, this my kit settings
The problem was that i installed Two versions of Qt and i think there config or something overlapped so the g++ option didn't appear until i remove both versions and installed Qt 5.9.1 again the g++ option appeared and now i don't have the issue any more .

How to create QT version for arm-linux-generic-elf-32

In my debian linux (with i386 processor).i installed QT creator thats works fine.Also i installed G++ cross compiler to run over another system which is having Debian linux with ARM processor.
Now in QT creator "Tools->Options->Build&Run-->Compilers" i added G++ compiler thats also using "Add" option that also fine.
Now in QT creator "Tools->Options->Build&Run-->Kits" i added new Kit with Name as "G++" , device type as "Desktop" , compiler as "G++ (above step added compiler)" thats also fine.
The problem here is in QT version option.In my QT version option having "QT 5.5.0 GCC 64bit" only. If i select that option it is showing the error because G++ compiler is "arm-linux-generic-elf-32 bit".
It is showing the error like , "The compiler G++ (arm-linux-generic-elf-32 bit) cannot produce code for the QT version QT 5.5.0 GCC 64bit (x86-linux-generic-elf-64bit)" .
For me the executable file only enough, no need to run on target directly.
Guide me how to add QT version for arm-linux-generic-elf-32bit
I had similar problem. Finally I found my mistake:
In menu:
QTCreator/Extras/Einstelungen/Compiler
(I guess it is QTCreator/Tools/Setting/Compiler in English.)
I clicked button Hinzufuegen ("Add") and then Benutzerdefiniert ("User defined") and that was wrong. It is to be: CCG!!!!!!!!!!!!!!!!!!!
Afterwards I had to set up also so called ABI to "arm-linux-generic-elf-32 bit"
Then I had a problem with Qt Versionen - it made its own and I could not delete it. So in "Kits" I inserted the new Qt Version.
It works somehow now...
Sort of crazy...
Select your custom kit, change Qt version to None. This is Windows screenshot, but it's same on Linux. If you have Qt version which config corresponds to your kit's compiller you can choose it instead None

QtCreator with BlackBerry Z10

I installed BlackBerry NDK including IDE and downloaded the SDK. Now, I already set up Qt-Creator 2.8.1, 2.8.0, 2.6.2... In every version there is another problem with the build settings. The most appropriate try was with 2.6.2 and manually setting up the BB10 integration.
BB10 NDK Version: 10.1 for Target 10.1.0.4633 armv7le-v7
Creator is always started with bbnk-env.bat called before.
2.6.2:
Compiler set to GCC with custom-arm-linux-generic-elf-32bit as proposed by https://developer.blackberry.com/native/documentation/core/qt_porting_tools.html
(I do have a second compiler set to unix instead of linux)
QT-Version provided by Blackberry NDK, Qt 4.8.5 within %BBNDK%\host_10_1_0_238\win32\x86\usr\bin\qmake.exe.
Devices: BBZ10 is connected and accessible. QtCreator successfully connects and can use the debugToken.
Now the problem is within the Kits: Created a kit for BBZ10, having the bbZ10 Device, bbndk\target_10_1_0_4633\qnx6\armle-v7 as sysroot, compiler (set for linux), gdb to ntoarm-gdb.exe, QT-Version to configured 4.8.5. I can now try any mkspec it always gives me the error (translated from german)
No mkspec found for given QT Version
Für diese QT Version wurde keine mkspec gefunden
I think the mkspecs are set to compile to unix-target, while the 4.5qt supplied with the sdk requires to be linux target (where in reality target is QNX)
Somehow i can compile with this version, but first i am not sure if this creates a correct executable, even more i cannot deploy the executable, since QT-Creator does not create the bar-descriptor.xml file...
2.8.1:
Using the same setup as in 2.6 (after having 2.6 QT Version configured) i am able to get to the same error. Using the "new" configuration system under "BlackBerry" page in settings i cannot correctly set up NDK Path. Will always tell me (translated from german)
Following problems were encountered during BB10 configuration:
No QT-Version found
No GCC compiler found
No GDB Debugger for BB10 Comiler found
No GDB Debugger for BB10 Simulator found
Has anyone successfully configured bb10 ndk to use with qt-creator (2.6/2.8.1) and encountered similar trouble?
How can i solve this issue?
Solved:
After 24 hours trying, installing, reinstalling, editing, crying... I reinstalled complete NDK and QtCreator 2.8 and edited bbndk-env_10_1_0_4633.bat.
I removed every Variable from batch file and set it to corresponding values, e.g. replace every %BASE_DIR% with your acutal base-dir (i.e. D:\bbndk).
For conveniance usage i craeted another batchfile, calling the bbndk-env batch and starting qt-creator.
Set Compiler, Qt-Version, Kits in Creator-Settings as described in https://developer.blackberry.com/native/documentation/core/qt_porting_tools.html
Keep mkspecs line under Kits-tab empty
Thank You

Qt Creator needs a compiler set up to build. Configure a compiler in the kit options

I Have Installed Qt Creator5 with latest binaries.
but when i am running any program it is giving me this error.
:-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.
i have searched the whole internet for answer but its inadequate and not helping.
kindly reply the way to get rid of this error.
i was also having the same problem so what i did is
For linux
sudo apt-get install g++
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
and then closed the qt creator and restarted it and it worked
i do not know which of the above two made it work but it worked !!
For Windows
Below given solution have worked for few people. so it is worth a try.
Delete this file
C:\Users\AppData\Roaming\QtProject\qtcreator\toolchains.xml
to solve the problem.
For me on Windows 7 this was solved by clicking on the arrow icon next to the computer icon on the bottom left of the Qt Creator screen above green arrows and then double clicked a compiler on the list and rebuild the project.
* for windows users only *
Before continuing to next steps make sure u have downloaded latest version of Qt.
Download and install minGW-64-bit from link:
https://sourceforge.net/projects/mingw-w64/files/latest/download
Remember The directory to which you install minGW.
Open Qt creator and go to tools -> options -> Build and Run
In Compilers tab Select add -> MinGW -> Name: MinGW path: Browse for mingw-w64.bat (you will find this file in the directory in which you have installed MinGW).ABI: x86 Windows msvc2015 pe 64bit Don't forget to apply your edits.
Go to Kit -> add Name: GCC Device Type: Desktop Device: Local PC (Default for desktop) Compiler: minGW Qt Version: select newest version Apply changes and restart qt
While creating new project make sure you use GCC as kit
If it still doesn't works Click computer icon on bottom left above play button -> GCC -> Build
OR
Go to projects (It is in the menu on left hand side) -> Build Steps -> make -> Override minGw31-make.exe -> browse to path in which you have installed minGW/bin\mingw32-make.exeDo the same for clean steps too
If u Still get any error after these steps try setting Environment Variables
Press Win+Q
Type " Environment variables "
click on " Edit the system environment variables "
System Properties -> Advance -> Environment Variables
Click on path (NOTE : Use These steps very carefully and do not mess with other options)
Click edit
press right arrow to go to end of text
type a semi-colon (if it isn't at the end of it because all the system paths are distinguished by a semi-colon)
paste path "MinGW_installation_directory\bin" (In my case it was "G:\Qt\Tools\mingw32\bin"). Make sure you copy and paste CORRECT path
Click OK and apply the changes.
That should do it !!!
user2304430 has it right, I struggled also figure it out. Above the green Run/Debug buttons in the bottom left, there's a computer icon with a pop-out menu. In there, you have to select your kit.
I went in circles for half an hour checking that my kits were set up right in options. But you actually have to select the kit in the Computer Icon -> pop-out menu in the bottom left before it does anything.
Amazingly, the first many Google pages for the error don't show this, you'd think almost all new users run into this.
I had a similar issue when developing on my Mac -
I was trying to do desktop development with QT creator 3.3.0 based on QT 5.4.0 (Clang 6.0 (Apple)) on OSX 10.9. After trying to manually modify my kits to use GCC, G++, and CLANG. I finally found this really simple solution:
Delete the xxx.pro.user file and then restart QT Creator. It should then automatically pick up your compilers/environments.
Had the same issue on Fedora 22 after installing Qt5.5.
Installing the following packages did the trick:
sudo dnf install gcc-c++
sudo dnf install mesa-libGL-devel
When I installed Qt into folder ~/Qt/ and then manually renamed the folder into something other, I had similar problem. When I restored the folder name into the original ~/Qt/ (specified at the Qt installer), the problem has disappeared; all was solved.

Which version of Xcode does xcodebuild use?

I have installed both Xcode 3.2 and Xcode 4.0.2 on the same machine, which uses Hudson for automated CI (continuous integration) builds. When I say that both were installed, what I mean by that is that I can use both Xcode 3 and Xcode 4 simultaneously or interchangeably. They both exist on the machine, as I did a custom install for Xcode 4 without overwriting Xcode 3 (supposedly).
Do command line calls to 'xcodebuild' invoke Xcode 3 or Xcode 4?
Does that question even make sense? Someone who may or may not be knowledgable on the topic is requesting that some projects be built with 3 and some with 4.
If so, how do I force it to use 3 or 4?
alternatively, is there a separate location where Xcode 3's 'xcodebuild' is stored vs. where Xcode4's 'xcodebuild' is stored? If there is, I can just use a different path in my build script.
You can find out what version is xcodebuild using with xcode-select -print-path. Also, change to a different version using xcode-select -switch <path>
Also, to determine which XCode environment is being used, use the command xcodebuild -version.
Outside the terminal, you can view and change this in Xcode.
Open Preferences, then select the Locations tab. Near the bottom, an entry titled Command Line Tools labels a dropdown, whose selection corresponds to the version of Xcode used in xcodebuild.
You may open this dropdown to select another version of Xcode that you have installed in your /Applications or ~/Applications folder.
Interestingly, this panel only says what this pop-up menu does and that it's analogous to xcode-select if you've selected a different version of Xcode than the one it's running in.
In case you need it, I also have a screenshot from what this used to look like in Xcode 8.

Resources