Bug 23072 – Creating a shared library using VS 2019 cannot find `open`

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2022-04-28T15:38:24Z
Last change time
2024-12-13T19:22:28Z
Assigned to
No Owner
Creator
Richard (Rikki) Andrew Cattermole
Moved to GitHub: dmd#20093 →

Comments

Comment #0 by alphaglosined — 2022-04-28T15:38:24Z
Simple scenario: ```d module testshared.d import std.stdio; void f() { writeln("Hello, World!"); } ``` $ dmd -shared testshared.d This produces a lot of linker errors due to missing libcmt.lib. With that added only one linker error remains: phobos64.lib(gzlib.obj) : error LNK2019: unresolved external symbol open referenced in function gz_open This works with ldc 1.29.0-beta1, but not dmd 2.099.0. I managed to copy some arguments from ldc that got it to link. $ dmd -shared testshared.d -L/DEFAULTLIB:msvcrt -L/DEFAULTLIB:vcruntime oldnames.lib That command worked.
Comment #1 by robert.schadek — 2024-12-13T19:22:28Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20093 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB