My tiny program still can't get FreeImage.dll to load... GLFW.dll library loads no problem...

Hipreme msnmancini at hotmail.com
Wed Mar 15 23:47:59 UTC 2023


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


More information about the Digitalmars-d-learn mailing list