Thanks for the reply.

I didn't realise that configure usually takes environment stuff on it's command line, lesson learned, I'll do it that way in future.

On the issue of locating libImath, that is working, as the configure uses pkgconfig to setup the locating the headers and libraries, hence the setting of PKG_CONFIG_PATH, so that the IlmBase.pc file that building the IlmBase libraries creates.

The link phase isn't complaining at all about not finding the libraries, but rather not finding the specific symbols. This is what is confusing me, as the 'nm' call suggests that the symbols are actually there in the Imath library.


Paul Gregory

On 1/29/07, Keith MARSHALL <> wrote:
Paul Gregory wrote:
> I've been banging my head against a wall for some time now trying
> to get the OpenEXR libraries to compile with MinGW.
> OpenEXR is primarily auto* based, and I'm trying not to stray from the
> defined build procedure too much if possible, I'm using MSYS to
> the building of these libraries with MinGW. The libraries consist of two
> part, IlmBase ( 0.9.0) and OpenEXR (1.5.0). I've managed to build the
> IlmBase libraries, using the following configure options...
> LDFLAGS="-Wl,--export-all-symbols" ./configure --disable-threading \
>   --disable-posix-sem

Modern autoconf practice would advocate:

  ./configure LDFLAGS="-Wl,--export-all-symbols" --disable-threading \

but that aside, you neglected to specify `--prefix', so your install
will presumably have put everything in /usr/local;  with a default MinGW
install, the compiler doesn't know to look there, for installed headers or
libraries.  The prefered setting would be

  ./configure --prefix=`cd /mingw && pwd -W` ...

if the build process may need the true Woe32 path, or simply

  ./configure --prefix=/mingw ...

if not.

> I've modified the source slightly to get this to work, and now the
> and 'make install' commands seem to work ok.

Ok.  That's normal, for porting from *nix to Woe32.

> I've now moved onto getting the OpenEXR libraries (which rely on the
> libraries) to work. I issue the following configure command...
> PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
> LDFLAGS="-Wl,--enable-auto-import,--enable-runtime-pseudo-reloc"

Again, today we prefer:

  ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \

> and during the configure it tries to test the availability of the
> libraries and fails.

Only to be expected, since MinGW doesn't know to where to look for those
libraries.  You either need to specify a `--prefix' which matches MinGW's
default library and include paths, for *both* packages, or you need to
specify the proper `-I' and `-L' options, through CPPFLAGS and LDFLAGS
respectively, so you OpenEXR build can locate the components installed
in /usr/local.


Paul Gregory
ICQ: 156088409