-
Notifications
You must be signed in to change notification settings - Fork 56
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
Building DLLs #3
Comments
Thanks for your suggestion. That's very good feature to support building libraries to share. |
Agreed, porting Foundation and Dispatch will be great as well. Thanks for your efforts. |
Hi, Checking the DLL content with Microsoft dumpbin gives this:
We see @_silgen_name("hello") public func hello() {
print("hello world")
}
@_silgen_name("get_number") public func getNumber() -> Int32 {
return 1234
} However, linking the DLL to a program (msvcrt.dll based) makes that program crashing. Loading it with LoadLibrary() returns ERROR_DLL_INIT_FAILED. |
Many years later: Can I compile my Swift code on Windows as a dynamic library (DLL)? I wish to call it from programme written in a different language |
Thanks for all your work helping to bring Swift to Windows.
Do you plan to support building a DLL instead of an executable? This would help a lot for those of us interested in using Swift to write cross-platform libraries.
The text was updated successfully, but these errors were encountered: