I am currently trying to use OpenEXR in a Unity3D project.
I compiled all I needed to get the Xcode Project running, which builds great. Using this Unity Documentation I figured out I had to make a bundle. All the kind of builds you can make in Xcode are explained here.
I made a .cpp interface that included the compiled OpenExr libs and builded it as a bundle. Using the documentation I was able to get my unity project to use my bundle and run perfectly!
Now here is my problem : I submitted all of this (including the .bundle file) on my git and when I pulled on another machine, I got a Dll not found exception when I ran the unity project. As you can read here, bundles are described as : " executable files that your program can load at runtime using dynamic linking functions". Now my understanding of static vs linked libraries might be a bit lagging behind but is it possible that the problem simply comes from the fact that I built my bundle dynamically and that my new machine does not have the compiled binaries (in it’s usr/local folders) ?
I tried to change my Mach-O type from bundle to a static archive library in Xcode (another Mach-O type). Xcode managed to compile and build successfully, but the new “static archive library bundle” did not work in Unity, at least not with my current .cpp interface and .cs Unity interface.
- Are there other things I would need
to set in Xcode for it to work or do
static archive library bundles simply
not work in unity ? - Is there another way to compile
everything I need statically ? Having
a big bundle file (~below 50MBs) is
not a problem for me. - If I must work with dynamic bundles,
is there a way to package all the
necessary compiled files (.a files in
my case) inside my project no future
teammates can easily checkout/pull
the project without having to compile
OpenEXR on their own ?
Thank you very much for your help !