1

I have a program that runs correctly when using .png files.
I'm trying to convert it to support OpenEXR.

The program is compiled with macports g++-mp-4.5, and links against macports's openexr1.7. Relevant parts of the compile line:

/opt/local/bin/g++-mp-4.5 ... -I/opt/local/include/OpenEXR -I/opt/local/include/OpenEXR file.cc ... -L/opt/local/lib -lIlmImf -lHalf ...

When run, it does this when it tries to call the exr library:

libc++abi.dylib: terminate called throwing an exception

When it is changed to link with the .a files /opt/local/lib/libIlmImf.a /opt/local/lib/libHalf.a it gives a link error

Undefined symbols for architecture x86_64: "Iex::throwErrnoExc(std::basic_string, std::allocator > const&)", referenced from: Imf::(anonymous namespace)::writeLineOffsets(Imf::OStream&, std::vector > const&) in libIlmImf.a(ImfOutputFile.o) Imf::StdIFStream::StdIFStream(char const*) in libIlmImf.a(ImfStdIO.o) Imf::(anonymous namespace)::checkError(std::basic_istream >&, long) in libIlmImf.a(ImfStdIO.o)

After searching, it seems that this (*undefined symbols for x86_64*) is a common problem for linux-style mac development, and does not appear to be specific to openexr. However after reading various posts, I still do not understand what the solution is!

Here is a post on the exact problem, however the solution is not explained in enough detail for me to understand: http://lists.nongnu.org/archive/html/openexr-devel/2011-08/msg00007.html

forgotmysocks
  • 355
  • 1
  • 3
  • 9

0 Answers0