Which issue did you encountered with DerelictFI?
p0nce opened this issue · comments
I didn't spend enough time to get this working. Initial attempts were quite unsuccessful
I'd be interested to know what problem. :)
If you encounter blockers, please file a bug at https://github.com/DerelictOrg/DerelictFI.
Hey, it is probably because of my incompetence than anything wrong with the bindings.
I initially tried to see if I can get this to work without dub but I couldn't figure it out. I then used dub for a brief period and didn't really see a way to specify the location of libfreeimage.dylib (on mac) - lflags?
I gave up pretty quick because I was ultimately going for an object oriented code in D that I can use later for working with images. Even if I got DerelictFI to work, it looked like I'd have to write a wrapper around it. Also, I am tempted to statically link the free image library to my codes.
It's ok to be confused that D has many sort of bindings :)
With Derelict you wouldn't have to specify a location, it has predefined paths hardcoded here: https://github.com/DerelictOrg/DerelictFI/blob/master/source/derelict/freeimage/freeimage.d#L42
In this case, I believe the .dylib would have been searched next to the executable.
These hardcoded locations are thankfully overridable when calling the loader .load() function: https://github.com/DerelictOrg/DerelictUtil/blob/master/source/derelict/util/loader.d#L92
So there is no flags or static libraries involved which can ease things up when being multiplatform. But sure, static linking can be preferred.
BTW I wrote a freeimage wrapper once here: https://github.com/d-gamedev-team/gfm/tree/master/freeimage/gfm/freeimage
Have fun with D !
Thank you for the pointers! I will give it another shot!