Cannot link DLL with static (non-import) library on Windows
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 55
Description
When building a DLL on Windows, linking with a static .lib (i.e. not an import library) requires the library names to come immediately after the `/link` flag. There's no option in `RunCBuilder` that accommodates this. This isn't an issue on other platforms as we can pass everything via the `flags` argument (e.g. `-lsomelib` or `-framework someframework`), but that doesn't work with `cl` on Windows (or at least, I haven't found a way to do so; I have fairly limited experience with Windows command line tools).
Here's my current workaround:
https://github.com/nmfisher/native/commit/7d9036b94df357fb90ebb5911f67bfa02a5e98a5#diff-3be70b0004f01804719416f1e5931eaa8e2d618280bb0f9fa9bdaf2edc468964
This was just a quick hack which is why I'm not submitting as a PR, if you have any preference for the best way to address this, let me know and I'm happy to put one together.
Contributor guide
Assessment
This issue has not been assessed yet.