www.digitalmars.com         C & C++   DMDScript  

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

reply mw <mingwu gmail.com> writes:
I have example.d:

```


/+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?


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

Thanks.
Dec 21 2022
next sibling parent mw <mingwu gmail.com> writes:
On Thursday, 22 December 2022 at 02:19:23 UTC, mw wrote:
 I have example.d:

 ```


 /+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.
Dec 21 2022
prev sibling parent rikki cattermole <rikki cattermole.co.nz> writes:
stringImportPaths
Dec 21 2022