Include .def definition file information for the linker into a .d source file

BoQsc vaidas.boqsc at gmail.com
Wed Nov 24 17:23:07 UTC 2021


On Wednesday, 24 November 2021 at 17:14:42 UTC, Adam D Ruppe 
wrote:
> On Wednesday, 24 November 2021 at 17:06:21 UTC, BoQsc wrote:
>> **The question:** Is there a way to include the `.def` file 
>> instructions inside `.d` file, so that there won't be a need 
>> for additional `.def` file when compiling. (`dmd winsamp`)
>
> https://dlang.org/spec/pragma.html#linkerDirective

The many times I tried this pragma, it did not even get 
recognised as pragma at all.
Essentialy it did not work. Mind giving a demonstration of this 
pragma?
```
dmd winsamp.d
winsamp.d(13): Error: unrecognized `pragma(linkerDirective)`
```


More information about the Digitalmars-d-learn mailing list