Cannot compile betterC app in windows using stderr

Abby abby at gmail.com
Wed Feb 2 01:24:30 UTC 2022


I have a simple


**dub.sdl**
```
name "test"
targetType "executable"
buildOptions "betterC"
```

**app.d**
```
module test;
import core.stdc.stdio : fprintf, stderr;

extern(C) int main(string[] args)
{
	fprintf(stderr, "Test\n",);
	return 0;
}
```



When I'm trying to compile this on windows with latest dmd or ldc 
I get
```Performing "debug" build using C:\D\dmd2\windows\bin64\dmd.exe 
for x86_64.
test ~master: building configuration "application"...
Linking...
test.obj : error LNK2019: unresolved external symbol stderr 
referenced in function main
.dub\build\application-debug-windows-x86_64-dmd_v2.098.1-dirty-FB5231E74956BBA34BF960F450A8342C\test.exe : fatal error LNK1120: 1 unresolved externals
Error: linker exited with status 1120
C:\D\dmd2\windows\bin64\dmd.exe failed with exit code 1.
```


Works with dmd-2.091.0

Any idea what might be the problem here?


More information about the Digitalmars-d mailing list