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-3556] Undefined symbols when using C methods defined in header files #46144

Open
ankitspd opened this issue Jan 5, 2017 · 0 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@ankitspd
Copy link
Member

ankitspd commented Jan 5, 2017

Previous ID SR-3556
Radar None
Original Reporter @aciidb0mb3r
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, ClangImporter
Assignee None
Priority Medium

md5: d37609c53cd5612a31aa1e5b9ec6fa8a

Issue Description:

Attached package doesn't build with swift package manager because the C module has a method defined in the header instead of the .c file:

Compile Swift Module 'exe' (1 sources)
Linking ./.build/debug/exe
Undefined symbols for architecture x86_64:
  "_test", referenced from:
      _myTest in main.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Users/ankit/workspace/swift.org/swiftpm/.build/debug/swift-build-tool -f /Users/ankit/Downloads/Test1/.build/debug.yaml
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant