Can't build a project with Chilkat library - ios

Can't build a project with Chilkat library in Xcode10, compilation fails with error:
library not found for -lstdc++.6
Apple Forum shows:
libstdc++ was deprecated about 5 years ago (note that it hasn't been
available in tvOS nor watchOS). Please switch to using libc++.
Any ideas on how to migrate the project to iOS12 and Xcode10?

Libstdc++ was deprecated, the support was removed from the iOS 12 simulator (not for device), now you must use libc++ instead.
Your version of Chilkat library was built with libstdc++, here you can find an updated version built with libc++.
Replace the library with the new one and rebuild.

Related

Using Swift v5.0.1 toolchain with Xcode 11 Beta

In theory, it should be possible to use previous Swift toolchains with new Xcode versions, so that you can continue to compiler your code before having to upgrade the Swift version. You can download toolchain version at https://swift.org/download.
However, while apps do compile after switching the toolchain in Xcode preferences and using Xcode 10.2 for the command line tools - running them results in this error on launch:
dyld: Symbol not found: _OBJC_CLASS_$__TtCs12_SwiftObject
Referenced from: ~/Library/Developer/CoreSimulator/Devices/CAAB28E5-9B4A-41A3-ADED-A481A62842BA/data/Containers/Bundle/Application/<Redacted>/Frameworks/PhoneNumberKit.framework/PhoneNumberKit
Expected in: /Library/Developer/Toolchains/swift-5.0.1-RELEASE.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib
in ~/Library/Developer/CoreSimulator/Devices/CAAB28E5-9B4A-41A3-ADED-A481A62842BA/data/Containers/Bundle/Application/<Redacted>/Frameworks/PhoneNumberKit.framework/PhoneNumberKit
There's some discussion around a similar error in previous Xcode betas, on GitHub, Apple forums, and elsewhere that suggest it's either and issue with Carthage or the beta - and possibly just the third-party lib I'm using itself.
Has anyone encountered this before? Is it possible to use old toolchains with newer Xcode versions?

library not found for -lstdc++.6.0.9 - Xcode 10 [duplicate]

This question already has answers here:
ld: library not found for -lstdc++.6
(7 answers)
Closed 4 years ago.
When I want to build my app in Xcode 10.0, I'm getting this error. How I can solve this issue ?
library not found for -lstdc++.6.0.9
Mac OS version : High Sierra 10.13.6
iOS iPad version : 12.0
Xcode version : 10.0
Regards,
Tuğçe.
From the Xcode 10 release notes,
Building with libstdc++ was deprecated with Xcode 8 and is not supported in Xcode 10 when targeting iOS. C++ projects must now migrate to libc++ and are recommended to set a deployment target of macOS 10.9 or later, or iOS 7 or later. Besides changing the C++ Standard Library build setting, developers should audit hard-coded linker flags and target dependencies to remove references to libstdc++ (including -lstdc++, -lstdc++.6.0.9, libstdc++.6.0.9.tbd, and libstdc++.6.0.9.dylib). Project dependencies such as static archives that were built against libstdc++ will also need to be rebuilt against libc++. (40885260)

dyld: Library not loaded: #rpath/libswiftCore.dylib after Xcode Update

I am having problems with an app I've been working on for a while. Everything was fine until went mad and updated Xcode to 9.4 (previously 9.3).
I'm using a third party framework compiled on swift 4.0.3. I worked perfectly, but after the update it wouldn't compile (can't build the framework compiled on 4.0.3 with 4.1). I downloaded and installed the Swift 4.0.3 Release Toolchain and i'm able to build with no errors.
However, when I run the target on the device (iOS 9.0 ipad) it crashes with dyld`dyld_fatal_error:
dyld`dyld_fatal_error:
0x1fe9008c <+0>: trap
0x1fe90090 <+4>: nop
The console outputs this:
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /private/var/containers/Bundle/Application/2E966F50-67E3-4250-858C-382319CD6274/myApp.app/Frameworks/myFramework.framework/myFramework Reason: Incompatible library version: myFramework requires version
1.0.0 or later, but libswiftCore.dylib provides version 0.0.0
Some Facts:
The Framework is in Embedded Binaries and Linked Frameworks and Libraries under General and Link Binaries with Libraries and Embed Frameworks under Build Phases.
This app need's to deploy on iOS 9.0 and the Deployment target is set accordingly.
I installed Xcode 9.3 again, but I had the same problem using the 4.0.3 toolchain.
My suspicions:
Can the Toolchain be corrupted in some way? I installed Swift 4.0.3 Release 2017-12-05 (a)
Even though I am working with the 4.0 toolchain, I can only choose from 4.1 and 3.3 under Swift Compiler in Build Settings. I imagine this is overwritten, but not sure.
My main concern is that even though the deployment target is set to iOS 9.0, under the BASE SDK is set to 11.3, and can't choose another. I can't find the 9.0 SDK on the internet. Could this be the problem?
Also, all of my certificates are valid and ok.
Thanks in advance, I'll add edits every time I find something new.
Well, I didn't receive any help here, but just in case anyone needs to know, the only way I managed to solve this was asking for an updated version of the framework we are using. It appears this is a compatibility problem that has no solution.
Following #Danf instructions solved for me.

How to build Mantle v2 for iOS 7.0?

my project currently targets iOS 7.1 and up. I have built Mantle along with Carthage as described on the Mantle's GitHub site. But I get the following error when building my project:
ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later
(#rpath/Mantle.framework/Mantle) for architecture arm64 clang: error:
linker command failed with exit code 1 (use -v to see invocation)
Does somebody know how I could build the Mantle.framework for iOS 7.1 (preferably with Carthage) ?
If you want to target iOS 7.x then you cannot use frameworks as frameworks are only supported from iOS 8.0 onwards. Since Carthage creates frameworks, you also won't be able to use Carthage.
If you still want to use Mantle, either include its files into your project manually or use Cocoapods to build it as a static library using one of the existing Cocoapods spec files for Mantle.

iOS ZipArchive compile error:invalid deployment target for -stdlib=libc++ (requires iOS 5.0 or later)

I'm using zipArchive library in Xcode to integrate into my project to do unzip operation. And I got following compile error message. my question is how can i resolve this compile issue?
What steps will reproduce the problem?
download ziparchive from http://code.google.com/p/ziparchive/:
create a new xcode project (just use single view template), select ios4.3 simulator
drag the download unzipped folder to project, and select "copy item..." ,"create group", and check the "add to targets"
What is the expected output? What do you see instead?
Compiled error with error message : invalid deployment target for -stdlib=libc++ (requires iOS 5.0 or later)
What version of the product are you using? On what operating system?
mac, xcode4.5.1, iphone4.3 simulator (it's OK in iOS6)
The file ZipArchive.mm from the ziparchive project has the suffix .mm for Objective-C++ files. However, the file does not seem to contain any C++ code. After renaming it to ZipArchive.m I could compile it even for iOS 4.3 deployment target.
A different solution of the problem can be found in the Xcode 4.5 Release Notes:
Projects created using this Xcode release use the new libc++
implementation of the standard C++ library. The libc++ library is
available only on iOS 5.0 and later and OS X 10.7 and later.
To enable deployment on earlier releases of iOS and OS X in your
project, set the C++ Standard Library build setting to libstdc++ (Gnu
C++ standard library).

Resources