Iphone application build error - iphone

I am using XCODE 3.2.5 and getting following error while compiling the code
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
Here are my settings:
C/C++ compiler version -- LLVM compiler 1.6
Base SDK - 4.2
IOS deployment target - 4.2
What could be wrong here?

The issue was with compiler. It should by GCC for IOS and LLVM for MAC.

Related

Swift Version Conflict: this SDK is not supported by the compiler - using BUILD_LIBRARY_FOR_DISTRIBUTION setting. What could be the issue?

I'm building a Swift static library with:
Xcode 13.2 (Swift compiler 5.5.2)
iOS Deployment target 12.0
Build library for distribution YES
Skip install NO
Swift language version 5 and tried with 4.2
Dependency managed with CocoaPods:
Japx 3.0.0
Alamofire 5.2.2
RxSwift
When I try to add it to an iOS project with this setup:
Xcode 13.3 (Swift compiler 5.6)
iOS Deployment target 12.0
Swift language version 5 and tried with 4.2
and build I get this error:
Failed to build module 'LibraryX'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5.2 effective-4.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)', while this compiler is 'Apple Swift version 5.6 effective-4.2 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)'). Please select a toolchain which matches the SDK.
These are the headers in the .swiftinterface
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 effective-4.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 4.2 -enforce-exclusivity=checked -Onone -module-name LibraryX
Obviously if I build the project with the same compiler version or building the library with the iOS project everything works fine. But the purpose here is to release a precompiled library and not its source code.
Every time that I lookup this error online I've found "You have to set Build library for distribution to Yes"
I tried to add the source code of the static library to a new Framework project, but I get the same result.
I also had this error, in my case it was unable to import a sub-dependency of my XCFramework during reading .swiftinterface file, however was showing this absolutely misleading error.
After repeatedly cleaning up DerivedData and trying different Xcode versions (13.0, 13.4.1) I've seen 2 errors: "this SDK is not supported by the compiler", and "No module named 'AnotherLib'" which was an incorrectly specified dependency inside of my Swift Package.
So, maybe only first part of the message is correct "Failed to build module 'LibraryX'", but the reason is something else, NOT the difference in compiler versions.

Xcode restKit error after updating into Xcode 4.5

I have an application running successfully on Xcode 4.2 iOS 5.1, when i updated to Xcode 4.5 to make the application compatible with iOS 6, when i run the application it gives an error
Apple Mach-O linker error: no such file or directory: '/Users/User/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/RestKit/RestKit'
Note that i have moved the whole project from a Mac that was running xcode 4.2 into another Mac running Xcode 4.5
Thanks in advance
Just goto BuildSettings of the Project and remove armv7s from Valid architecture

Xcode 4.4 - Inline Assembly Issue

In Xcode 4.4 I am getting error when I try to build iOS project that has methods written in assembly. I am getting error "Inline Assembly Issue - invalid operand for instruction" for this line vqrdmulh.s16 q2, q13.
I tried to compile with LLVM 4.0 and LLVM GCC 4.2 but I am getting the same error.
Project was compiling fine in previous version of Xcode.
Does someone know how to solve this error? Thanks.

Iphone Zxing: QR code scanning code not working in Release build

I have integrated Zxing source code for QR code scanning in my Iphone project.
Until I built Zxing's project in Debug mode, it scans QR codes perfectly but in Release mode, the application is not able to scan the QR code from QR Image.
It just stops scanning QR codes without any error/exception. When we revert our build in Debug mode then it again scans perfectly.
I built Zxing's project in release mode with below mentioned settings:
1. XCode: 4.0.1 Compiler: GCC 4.2 Optimization Level: -O0
2. XCode: 4.0.1 Compiler: GCC 4.2 Optimization Level: -Os
3. XCode: 4.0.1 Compiler: LLVM GCC 4.2 Optimization Level: -O0
4. XCode: 4.0.1 Compiler: LLVM GCC 4.2 Optimization Level: -Os
5. XCode: 4.0.1 Compiler: LLVM compiler 2.0 Optimization Level: -O0
6. XCode: 4.0.1 Compiler: LLVM compiler 2.0 Optimization Level: -Os
7. XCode: 4.2 Compiler: LLVM GCC 4.2 Optimization Level: -O0
8. XCode: 4.2 Compiler: LLVM GCC 4.2 Optimization Level: -Os
9. XCode: 4.2 Compiler: Apple LLVM compiler 3.0 Optimization Level: -O0
10. XCode: 4.2 Compiler: Apple LLVM compiler 3.0 Optimization Level: -Os
I have no clue where the issue is. Any help in this will be very helpful. Thanks..
The ZXing FAQ mentions that Release builds don't work with Xcode prior to 4.2 if you use llvm (llvm-gcc or clang) due to bugs in llvm. Both llvm-gcc and clang have been verified to work in Release mode with Xcode 4.2 and later, at least with ScanTest and Barcodes. I've still seen bugs with C++ and clang with Xcode 4.2 but they don't seem to affect ZXing, at least as seen with ScanTest and Barcodes.
The behavior with respect to the DEBUG symbol you mention is not repeatable on ScanTest or Barcodes. Neither of these projects defines DEBUG. Since defining DEBUG compiles in more debugging code, you may still be seeing an optimization bug.
You don't mention with architecture you're building for (armv6 or armv7). There are reportedly problems with optimizations with armv6 if you don't turn off Thumb mode. The projects in ZXing's svn do this; this change is not yet in any of the ZXing releases.

Xcode 3.2.2 and LLVM version 1.0.2 failing

I have Xcode 3.2.2 and I am trying to use LLVM version 1.0.2 as a compiler.
When I do that, I see the error
Library not found for -lgcc
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang
failed with exit code 1
How do I solve that?
thanks.
You can't use LLVM to compile iPhone apps in 3.2. You'll need to use GCC.
In fact it seems that you can use LLVM on Xcode 3.2.3. I've just downloaded it now and LLVM works!!!!