Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-3898] swift build works but the generated Xcode project needs to add a framework manually #5113

Closed
swift-ci opened this issue Feb 8, 2017 · 2 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Feb 8, 2017

Previous ID SR-3898
Radar None
Original Reporter rockywei (JIRA User)
Type Bug
Status Closed
Resolution Invalid
Environment

Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)
Target: x86_64-apple-macosx10.9
Xcode: Version 8.2.1 (8C1002)

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: b26c03dd42042c04209ed9759257a759

Issue Description:

Hi, I am working on this project right now: Perfect SPNEGO which is using a module map like this:

module cspnego {
  header "cspnego.h"
  link "gssapi_krb5"
  link "cspnego"
  export *
}

Running `swift build` will work both on Mac & Linux; However, the Xcode project generated by `swift package generate-xcodeproj` needs to add a GSS framework manually otherwise it won't build.

I noticed that such a framework requires `ld -framework GSS` other than `ld -lGSS`, so what should I do to the module map to tell swift package manager add this framework?

Thank you very much!

@ankitspd
Copy link
Member

ankitspd commented Feb 8, 2017

You can use this command to pass additional flags while generating the project:

$ swift package -Xlinker -framework -Xlinker GSS generate-xcodeproj

@swift-ci
Copy link
Contributor Author

Comment by Rockford Wei (JIRA)

Thank you very much![]( It works) Please close the issue!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants