Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Using the FreeImage library on iOS and Android

Discussion in 'Scripting' started by Bibzball, Apr 3, 2017.

  1. Bibzball


    Sep 26, 2015
    Hi there Unity community!

    I am trying to use the FreeImage library (and its wrapper FreeImageNet - in Unity on Android and iOS

    I downloaded the freeimage visual studio project to build a .DLL to put in my Assets/Plugins folder and managed to get it to work on PC in a few minutes.

    However, I am now trying to use it on an Android build of my project, and I am stuck the moment I try to use any function from the library:

    Unable to lookup library path for 'FreeImage', native render plugin support disabled.
    Unable to find FreeImage
    DllNotFoundException: FreeImage
    at (wrapper managed-to-native) FreeImageAPI.FreeImage:Load (FreeImageAPI.FREE_IMAGE_FORMAT,string,FreeImageAPI.FREE_IMAGE_LOAD_FLAGS)

    I am guessing I have to compile the .dll in a special way to have it to work on Android ?

    The thing is I am kind of a newbie when it comes to multiplatform compilation, and could not find a good explanation on how to compile any external library for all platforms. I haven't tested on iOS yet but I guess I'll encounter similar issues.

    Any help, tutorial, anything I missed ?

    Thanks a bunch!