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-1619] Importing C Modules in REPL fails #4523

Open
swift-ci opened this issue May 25, 2016 · 2 comments
Open

[SR-1619] Importing C Modules in REPL fails #4523

swift-ci opened this issue May 25, 2016 · 2 comments
Labels
bug Something isn't working LLDB for Swift REPL

Comments

@swift-ci
Copy link

Previous ID SR-1619
Radar None
Original Reporter bhargavg (JIRA User)
Type Bug
Environment

swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a.xctoolchain - Mac 10.11.4

Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug, REPL
Assignee None
Priority Medium

md5: ef8d4f0f2ac78a135f1863491511dcd4

Issue Description:

Swift REPL throws error: Couldn't lookup symbols: when trying to run methods from .so library.

I've tried the following:

$ # libBarCModule.so is present in .build/debug folder
$ swift -I.build/debug -L.build/debug -lBarCModule
$ LD_LIBRARY_PATH=.build/debug swift -I.build/debug -L.build/debug -lBarCModule

But, both failed in similar manner:

# In REPL
1> import BarCModule
2> say_hi
error: Couldn't lookup symbols:
  _say_hi
@belkadan
Copy link

OS X uses DYLD_LIBRARY_PATH rather than LD_LIBRARY_PATH, but I think you'd still have the same issue.

@belkadan
Copy link

The proper extension for loadable libraries is also "dylib", not "so".

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LLDB for Swift REPL
Projects
None yet
Development

No branches or pull requests

2 participants