Watch OS 2, error linking library

Hello,


I try to link a library to my WatchOS2 swift application but I have this eror :


building for watchOS simulator, but linking in object file built for iOS, for architecture i386

Can-we link a framework or library in an Apple WatchKit Extension?

Can someone help me?

Thanks

I have the same problem, I would like to use ffmpeg library in WatchOS but no matter how I build it I'm not able to link it to the WatchKit Extension.


...lib/libavcodec.a(avpacket.o), building for watchOS simulator, but linking in object file built for iOS, for architecture i386

The error message indicates that libavcodec.a was bult for iOS. You need to build libavcodec.a for watchOS and link in that copy.

Yes, you certainly can. But it needs to be a compatible library. In this case, you're trying to link in an iOS library. You need to use a watchOS library.

Watch OS 2, error linking library
 
 
Q