Hi -- this warning is appearing for me too in an Xcode Project:
'Could not find or use auto-linked library' subsequently with a bunch of errors stemming from 'Undefined symbols for architecture arm64'. Having read through this topic, it seems similar, although the library files in this case were placed directly into "CMyLibrary". Any pointers in this scenario would be greatly appreciated.
Swift Package that wraps a C Library with the manifest as so:
let package = Package(
name: "CMyLibrary",
platforms: [
.macOS(.v11),
.iOS(.v15)
],
products: [
.library(name: "CMyLibrary", targets: ["CMyLibrary"])
],
dependencies: [
// .package(url: /* package url */, from: "1.0.0"),
], targets: [
.target(name: "CMyLibrary", dependencies: [])
]
)
module.map looks like this:
module CMyLibrary {
header "mylibrary.h"
link "mylibrary"
export *
}
Then created a library to interface with the wrapper, with the following manifest:
let package = Package(
name: "MyLibrary",
platforms: [
.macOS(.v11),
.iOS(.v15)
],
products: [
.library(
name: "MyLibrary",
targets: ["MyLibrary"]),
],
dependencies: [
// .package(url: /* package url */, from: "1.0.0"),
.package(path: "../CMyLibrary"),
.package(path: "../SomeKit"),
],
targets: [
.target(
name: "MyLibrary",
dependencies: ["CMyLibrary","SomeKit"]),
]
)