How to deploy single exe application (?)
russhy
russhy at gmail.com
Mon Nov 15 22:28:41 UTC 2021
On Monday, 15 November 2021 at 21:16:14 UTC, Willem wrote:
> Using D -- I have created a simple command line utility that
> download some info via a https API and save it in a sqlite3
> database file. To use the exe on another windows machine, I
> need to copy over the relevant sqlite3 and curl DLL files.
>
> Question: Is there a way to create a single .exe with the
> relevant windows DLL info in there? Can this be done with
> static linking?
>
> Any feedback / pointers on where to start would be greatly
> appreciated.
>
> Many Thanks, Willem
you can statically link libraries just like in other languages
if you use dub it's as easy as this:
```json
"sourceFiles-windows": [
"../_clibs/glfw3.lib",
]
```
if you use plain dmd, then it's simple
```
dmd main.d mylib.lib
```
More information about the Digitalmars-d-learn
mailing list