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-14139] Undefined symbols for architecture x86_64 #312
Comments
@swift-ci create |
CC @allevato |
Looks like SwiftFormat isn't actually in the link line. I just cloned this repo at `next` and the package builds successfully. Have you ensured that you have the proper package dependencies installed? Perhaps trying blowing away your package build directory and resetting package caches to re-pull these dependencies. |
It looks like the Package.swift in your Since both projects export their API with the module name |
Comment by Matic Zavadlal (JIRA) Sorry for the trouble with commits. Indeed, we changed it because of the problems. This is the relevent [commit|maticzav/swift-graphql@8e0db37.] Note that the library builds itself. The issue arises when I try running Codegen script - when compiling the StarWars example. |
Is this issue still relevant? If so, please re-open it. |
Environment
I am running this on 11.1 MacOS Big Sur with 12.0 XCode.
Additional Detail from JIRA
md5: 2fe2fd02d5afe157f55c9241f621b7e2
Issue Description:
Hi!
I hope this is not a silly question; how do you use this library inside another Swift library? I am maintaining a GraphQL client library that heavily relies on code generation. Since the code is mainly unformatted, I'd like to format it before writing it out on a disk.
I am trying to use `swift-format` (which relies on `swift-syntax`) and I am getting a strange error when using the library.
```
Undefined symbols for architecture x86_64:
"_$s11SwiftFormat0A9FormatterC13configuration16diagnosticEngineAC0aB13Configuration0G0V_0A6Syntax010DiagnosticF0CSgtcfC", referenced from:
_$sSS19SwiftGraphQLCodegenE6formatSSyKF in String+Format.swift.o
"_$s11SwiftFormat0A9FormatterC6format6source15assumingFileURL2toySS_10Foundation0H0VSgxztKs16TextOutputStreamRzlF", referenced from:
_$sSS19SwiftGraphQLCodegenE6formatSSyKF in String+Format.swift.o
"_$s11SwiftFormat0A9FormatterCMa", referenced from:
_$sSS19SwiftGraphQLCodegenE6formatSSyKF in String+Format.swift.o
"_$s24SwiftFormatConfiguration0C0VACycfC", referenced from:
_$sSS19SwiftGraphQLCodegenE6formatSSyKF in String+Format.swift.o
ld: symbol(s) not found for architecture x86_64
```
I've seen the note in swift-syntax's README that talks about linking the library, and I've found a similar issue (and its [fix|SwiftDocOrg/homebrew-formulae@af4cd47),)]), but the other libraries in the examples section in that README don't rely on any such script.
Can you help me? What am I doing wrong? What should I look at to understand the error message?
Thank you!
> I know this is not ideal, but you can find all the code in [SwiftGraphQL|https://github.com/maticzav/swift-graphql/tree/next]'s repo.
The text was updated successfully, but these errors were encountered: