in dub single file build how to pass "-J<dir>" options?

mw mingwu at gmail.com
Thu Dec 22 02:30:53 UTC 2022


On Thursday, 22 December 2022 at 02:19:23 UTC, mw wrote:
> I have example.d:
>
> ```
> #!/usr/bin/env dub
>
> /+dub.sdl:
> dependency "tkd" version="~>1.1.14"
> +/
> ...
> ```
>
> $ dub build --single example.d
>
> ...
> Error: need `-J` switch to import text file `folder_page.png`
>
>
> I'm wondering how to pass  "-J<dir>" options?

Found it, it's:

```
/+dub.sdl:
dependency "tkd" version="~>1.1.14"
dflags "-Jmedia"
+/
```


> BTW, for such single file build, do I have to use dub? is there 
> another way to just use dmd?

Still don't know how to directly invoke dmd to build.



More information about the Digitalmars-d-learn mailing list