www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Anybody use FreeImage on Linux with D?

reply WhatMeWorry <kheaser gmail.com> writes:
I've been stumped for several days trying to resolve this run 
time error. I'm pretty new with Linux. No problem on Windows.


DerelictFI.load("/home/generic/MySharedLibraries/libfreeimage.so");


before DerelictFI.load
derelict.util.exception.SymbolLoadException ../../../.dub/packages/derelict-util-2.0.6/source/derelict/u
il/exception.d(35): Failed to load symbol FreeImage_JPEGTransform from shared
library /home/generic/MySharedLibraries/libfreeimage.so
----------------

Here's what my shared library looks like. 3.17.0 should be the 
latest.


(dmd-2.071.0)generic generic-ThinkCentre-M93p:~/MySharedLibraries$ ls -al
libfreeimage*
-rw-r--r-- 1 generic generic 731208 Mar  9 02:54 
libfreeimage-3.17.0.so
lrwxrwxrwx 1 generic generic     17 Jul 22 21:11 libfreeimage.so 
-> libfreeimage.so.3
lrwxrwxrwx 1 generic generic     22 Jul 22 21:11 
libfreeimage.so.3 -> libfreeimage-3.17.0.so


Thanks.
Jul 27 2016
parent Mike Parker <aldacron gmail.com> writes:
On Wednesday, 27 July 2016 at 23:59:15 UTC, WhatMeWorry wrote:
 I've been stumped for several days trying to resolve this run 
 time error. I'm pretty new with Linux. No problem on Windows.


 DerelictFI.load("/home/generic/MySharedLibraries/libfreeimage.so");


 before DerelictFI.load
 derelict.util.exception.SymbolLoadException ../../../.dub/packages/derelict-util-2.0.6/source/derelict/u
il/exception.d(35): Failed to load symbol FreeImage_JPEGTransform from shared
library /home/generic/MySharedLibraries/libfreeimage.so
 ----------------

 Here's what my shared library looks like. 3.17.0 should be the 
 latest.


 (dmd-2.071.0)generic generic-ThinkCentre-M93p:~/MySharedLibraries$ ls -al
libfreeimage*
 -rw-r--r-- 1 generic generic 731208 Mar  9 02:54 
 libfreeimage-3.17.0.so
 lrwxrwxrwx 1 generic generic     17 Jul 22 21:11 
 libfreeimage.so -> libfreeimage.so.3
 lrwxrwxrwx 1 generic generic     22 Jul 22 21:11 
 libfreeimage.so.3 -> libfreeimage-3.17.0.so
Google showed me [1], so if you are on Fedora that's likely the issue. Regardless, if this is a function you aren't using, you can use Selective Symbol Loading [2] to ignore it. Otherwise, you'll have to build a custom FreeImage binary that includes it. [1] https://gitlab.alelec.net/corona/mingw-packages/blob/001d5085ebb99241004caef02db9fbd3d66a2a83/mingw-w64-FreeImage/FreeImage-3.16.0_disable-some-plugins.patch [2] http://derelictorg.github.io/using/fail.html
Jul 27 2016