xcode 9 ld: library not found for -lswiftSwiftOnoneSupport for architecture x86_64

Hi,


I created a static swift library, which I'm trying to use from another project. When trying to build the project where I added it as a dependency, I receive the following error:

ld: library not found for -lswiftSwiftOnoneSupport for architecture x86_64


Tried to fix it by setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to true. Did not help.


Do you have any ideas? What other information should I provide?


Thanks,

Mark

Have you had any success with this? I am completely stuck and do not even understand the cause of the problem.

Hi,


I managed to get through this error by adding
-L/Library/Developer/CommandLineTools/usr/lib/swift_static/macosx/

to 'Other linker flags' in the Build Settings. It got me to the next error, which is not finding SwiftUIKit.

Hi,

Any further updates on this?


I added the -L/Library/Developer/CommandLineTools/usr/lib/swift_static/macosx/ to 'the other linker flags' and I have my codebase on two machines, 1 is giving me the same swiftUIKit error as above and the other is giving me the following:


ld: warning: URGENT: building for iOS simulator, but linking in object file (/Library/Developer/CommandLineTools/usr/lib/swift_static/macosx/libswiftCore.a(KnownMetadata.cpp.o)) built for OSX. Note: This will be an error in the future.
ld: warning: URGENT: building for iOS simulator, but linking in object file (/Library/Developer/CommandLineTools/usr/lib/swift_static/macosx/libswiftFoundation.a(Foundation.o)) built for OSX. Note: This will be an error in the future.
ld: framework not found CoreServices for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

You need to add at least one Swift file to the target you are trying to build!

So just add a Swift file to the project which wants to use your Swift framework and it works 🙂

In my case usually when I face this issue it means that iOS version mismatch with main project exists. Just navigate to your framework - Build Settings - Deployment - iOS Deployment target and check if it is the same as main project, if not just set the correct one. Hope it helps

Done like Melany said. and work for me.

Check this site it helped me ------->>>> [https://not.justsolutionsproducts.com/xcode-9-ld-library-not-found-for-lswiftswiftononesupport-for-architecture-x86_64/)

xcode 9 ld: library not found for -lswiftSwiftOnoneSupport for architecture x86_64
 
 
Q