OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications. In order to develop plugins and tools that can handle OpenEXR file formats, you need to have the OpenEXR libraries built for your OS.
I had been not using Maya for the past few months since I have been dealing with proprietary applications used at my workplace. So I decided to continue work on Maya whenever I get back home after the days work. And what better way to start things all over again than starting with the API.
So I made a checklist of the libraries and other tools which I need to get built to start working on the same.So here I was building OpenEXR on openSUSE 11.4 and I stumbled across few things here and there which I felt would be valuable if I share with you all.
Building OpenEXR on you OS requires the zlib and ilmbase libraries which has to be linked at the time of configuring.So the first task is to get zlib and ilmbase libraries built on your machine.
I had my libraries installed in my sandbox folder which is /usr/local/sandbox referred by environment variable $SANDBOX. In case you have installed in locations other than standard paths like(/usr/include and /usr/lib) you need to make the build aware of the same.
setting the the environment variable PKG_CONFIG_PATH to $SANDBOX/lib/pkgconfig will let OpenEXR get the package info regarding zlib and ilmbase.
./configure –prefix $SANDBOX LDFLAGS=-L$SANDBOX/lib CPPFLAGS=-I$SANDBOX/include
While executing make if you come across the following error
main.cpp:195:28: error: ‘strcmp’ was not declared in this scope
make: *** [main.o] Error 1
make: Leaving directory `/home/anoop/apps/sources/openexr-1.6.1/exrenvmap’
make: *** [all-recursive] Error 1
you can fix it by including
in the header file list of main.cpp in both exrmaketiled and exrenvmap dirs.
and then execute