Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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!