On Wednesday, 15 March 2023 at 22:09:35 UTC, WhatMeWorry wrote:
I appreciate all the help people have given me previously. So I've made everything super simple. The dub.sdl file consists of four lines:
- Solution to this problem: Checking whether it exists is completely irrelevant if you don't pass absolute path to it. Plus, the load function checks whether it exists on system32 too. For a DLL to be load, it must be beside you .exe file. That means: exists() is relative to your working directory, dll load is relative to the directory the .exe is.
- Better solution: There's no point into using libfreeimage. In D we already have Gamut[1] and [2] arsd:image_files. Both solutions is better suited to working with D as they use actual D syntax and features to make your code faster and safer, there will be no need to have a C compiler nor to pack a DLL together with your program.
[1]: https://code.dlang.org/packages/gamut [2]: https://code.dlang.org/packages/arsd-official%3Aimage_files