November 25, 2021

On Wednesday, 24 November 2021 at 17:06:21 UTC, BoQsc wrote:

>

I'm not sure if I have sucessfully achieved something like this before or is it even possible right now, but there is a sample file that comes with DMD compiler: D\dmd2\samples\d\winsamp.d

The problem: winsamp.d have to be compiled with .def file.

/+ Compile with:
 +  dmd winsamp winsamp.def
 + or:
 +  dmd winsamp -L-Subsystem:Windows
 +
 + 64 bit version:
 +  dmd -m64 winsamp -L-Subsystem:Windows user32.lib
 +/

This is how the .def file looks like
(D\dmd2\samples\d\winsamp.def):

EXETYPE NT
SUBSYSTEM WINDOWS

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)

What most ppl do in that case is to just provide a script, for example build.cmd that just does what it needs. The user just clicks the script and it does everything for them.

November 25, 2021

On Thursday, 25 November 2021 at 06:56:38 UTC, BoQsc wrote:

>

In other words: as simple as possible to use.

dmd -i,no need one big file.

November 25, 2021

On Thursday, 25 November 2021 at 09:00:52 UTC, Imperatorn wrote:

>

What most ppl do in that case is to just provide a script, for example build.cmd that just does what it needs. The user just clicks the script and it does everything for them.

"How can I make it so that I don't need an extra file written in another language?"
"Just add yet another file written in yet another language".

Nice going there :)

Build scripts never have been scalable. A good language shall only require a compiler and source file(s). No extra voodoo mumbojumbo. This is why we have all those pragmas and the -i switch.

November 25, 2021

On Thursday, 25 November 2021 at 09:47:50 UTC, Stanislav Blinov wrote:

>

On Thursday, 25 November 2021 at 09:00:52 UTC, Imperatorn wrote:

>

What most ppl do in that case is to just provide a script, for example build.cmd that just does what it needs. The user just clicks the script and it does everything for them.

"How can I make it so that I don't need an extra file written in another language?"
"Just add yet another file written in yet another language".

Nice going there :)

Build scripts never have been scalable. A good language shall only require a compiler and source file(s). No extra voodoo mumbojumbo. This is why we have all those pragmas and the -i switch.

Scalable or not it's a pretty common pattern. The build script is modular.

I wouldn't call the linker "mumbojumbo". Voodo maybe, yes.

1 2
Next ›   Last »