You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to learn about importing C libraries as modules but this documentation sent me on the wrong path.
The instructions no longer work. Following the steps from the libgit2 example doesn't lead to a buildable project:
warning: system packages are deprecated; use system library targets instead
error: the package does not contain a buildable target
This warning suggests I should use a system library instead, but the documentation doesn't mention these. The examples always create a separate package for a C library so I was using a system library inside that separate package, which caused me going in circles.
Also, it's not clear to me if link statements in the module map are still required. Everything I've tried so far seems to work fine without them. Can they be removed if the pkgConfig attribute is used?
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 8a6b5094e6c7e34715078574fcf37bec
Issue Description:
I'd like to request an update for https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md
I wanted to learn about importing C libraries as modules but this documentation sent me on the wrong path.
The instructions no longer work. Following the steps from the libgit2 example doesn't lead to a buildable project:
This warning suggests I should use a system library instead, but the documentation doesn't mention these. The examples always create a separate package for a C library so I was using a system library inside that separate package, which caused me going in circles.
I eventually came across https://github.com/kelvin13/swift-package-manager/blob/d436338507b20c9ded0017474ab86e8c532fff2b/Documentation/SystemLibraryHowTo.md which led me to the following solution (in a single package):
Is this the correct approach?
Also, it's not clear to me if link statements in the module map are still required. Everything I've tried so far seems to work fine without them. Can they be removed if the pkgConfig attribute is used?
The text was updated successfully, but these errors were encountered: