How to embed data within an executable?

Gary Willoughby dev at nomad.so
Sun Feb 2 09:12:26 PST 2014


On Sunday, 2 February 2014 at 16:52:38 UTC, bearophile wrote:
> Gary Willoughby:
>
>> I'm using DMD to create an executable and wondered what is the 
>> best way to embed data into it.
>>
>> For example, i want to embed base64 image data in the 
>> executable then access it during runtime. Is this possible? if 
>> so how?
>
> There are various ways to do it. If your data is not too much, 
> one way is to use a "hex string". You can also use 
> mixin(import("...")).
>
> Bye,
> bearophile

How do you access that at runtime?


More information about the Digitalmars-d-learn mailing list