BB9z / LAME-xcframework

LAME.xcframework supports all Apple platforms.
Other
19 stars 1 forks source link

Package cannot be added as a dynamic library #1

Closed MMise closed 4 days ago

MMise commented 1 week ago

It is not possible to add this package as a dynamic library through SPM. I have been using this package for a long time (version 3.100.0). After updating to version 3.100.1 I get an error dyld: Library not loaded: /Library/Frameworks/LAME.framework/LAME. After some investigation I found out you should change:

products: [
        .library(name: "LAME", targets: ["LAME"])
],

to:

products: [
        .library(name: "LAME", type: .dynamic, targets: ["LAME"])
    ],

in Package.swift of this package

BB9z commented 1 week ago

Got it, I will take a look this weekend.

BB9z commented 1 week ago

This is weird, I can't even get the dynamic library works successfully locally. Needs further investigation.

As far as I know, type: .dynamic is not required: https://developer.apple.com/documentation/xcode/distributing-binary-frameworks-as-swift-packages

BB9z commented 1 week ago

I know what went wrong. Give me some time to make sure it's all right this time.

BB9z commented 1 week ago

@MMise 3.100.2 should work, try it out.

MMise commented 4 days ago

Seems to work now!