betterC: string mixins in module - again

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Dec 30 23:42:36 UTC 2025


On 31/12/2025 12:39 PM, DLearner wrote:
> And we get: (DMD64 D Compiler v2.111.0)
> ```
> ctfemst.obj : error LNK2019: unresolved external symbol _memset128ii 
> referenced in function main
> ctfemst.exe : fatal error LNK1120: 1 unresolved externals
> Error: linker exited with status 1120
>         C:\Program Files\Microsoft Visual 
> Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX64\x64\link.exe /NOLOGO "ctfemst.obj"    /LIBPATH:"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\lib\x64" legacy_stdio_definitions.lib /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22000.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64"
> Error: undefined reference to `_memset128ii`
>         referenced from `main`
>         perhaps a library needs to be added with the `-L` flag or 
> `pragma(lib, ...)`
> ```

Yeah static arrays have trouble initializing in -betterC.

But only with dmd.

https://github.com/dlang/dmd/blob/master/druntime/src/rt/memset.d#L83

https://github.com/dlang/dmd/issues/19579


More information about the Digitalmars-d-learn mailing list