Xcode 3.2.2 and LLVM version 1.0.2 failing - iphone

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!!!!

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.

Unsupported compiler 'GCC 4.2' selected for architecture 'armv7' in xcode 4.6

I accidentally updated my iphone to 6.1 and when that happened I came to know that I have to update the xcode version too to Version 4.6 (4H127), which I did. I had a requirement to read qrcode for which I was using Zxing and it was working perfectly well. After all updates, its throwing an error with build failed. The error says
"Unsupported compiler 'GCC 4.2' selected for architecture 'armv7'"
I tried searching for the answer changed the compiler from Default to LLVM GCC 4.2 from default that is APPLE LLVM Compiler 4.2 but with no change.
Please guide me to resolve the issue.

Using GCC 4.2 in Xcode 4.2 iOS SDK 5.0

I found this post about using GCC 4.2 in Xcode 4.2 StackOverflow Post.
Did anyone else receive the error "Error writing -: Broken pipe" after following the steps in the above post?
After following the steps I can see GCC 4.2 as an option for the compiler.
Compiling a project using LLVM compiler 3.0 still works, but using LLVM GCC 4.2 or GCC 4.2 generates the pipe error.
I hope someone encountered the same problem and managed to fix it!
Simple and userful solution https://github.com/kennethreitz/osx-gcc-installer/
It automates the lists of the declaration on the stackoverflow

can't compiler json-framework

I'm using json-framework to parse json, but when I compile I get the following errors:
xxx/SBJsonStreamParser.h
xxx/SBJsonStreamParser.h:105: error: expected a property attribute before 'unsafe_unretained'
xxx.h:106: error: expected a property attribute before 'strong'
etc....
Developer Information:
Version: 4.2 (4D199)
Location: /Developer
Applications:
Xcode: 4.2 (828)
Instruments: 4.2 (4233)
Dashcode: 3.0.2 (336)
SDKs:
Mac OS X:
10.6: (10K549)
10.7: (11C63)
iPhone OS:
5.0: (9A334)
iPhone Simulator:
4.3: (8H7)
5.0: (9A334)
Check in your Build Settings/Build Options the compiler: Use the default Apple LLVM compiler 3.0 instead of LLVM GCC 4.2.
Use JSONKit instead, it's faster, has less memory leaks, and it might be easier to switch than debugging this issue.
https://github.com/johnezang/JSONKit

Iphone application build error

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.