openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] compiling OpenEXR shake plugin on OSX


From: Derek Gerstmann
Subject: Re: [Openexr-devel] compiling OpenEXR shake plugin on OSX
Date: Fri, 27 Aug 2004 18:00:04 -0600
User-agent: Mozilla Thunderbird 0.7.2 (Windows/20040707)

Qin Shen wrote:

> I'm currently trying to compile the OpenEXR shake plugin on
> my MacOSX machine. I did get it compiled and running on
> my machine. However, after the bundle file was disted to
> other OSX machines, it reports errors saying that it can't
> find "libHalf.2.dylib". Apparently, the libs were linked dynamically.
>
> My question is:
>
> How would you statically link the libraries? It seems that the
> Xcode project file already includes libHalf.a, libIex.a,
> libIlmImf.a and libImath.a, why is it still looking for the
> .dylib files?

If you're able to build from the commandline, you can force
gcc to link the static libs instead of the dynamic ones
by bypassing the pkgconfig output and just inserting
in your system paths and lib archives.

Here's a rough template makefile, adjust the paths for
OpenEXR and your setup accordingly (also note that MAKE is
real picky on whitespace so you might need to fix all the tabs):

-- start rough makefile template --

#
# Makefile for the OpenEXR Shake plugin
#

EXRINC = /path/to/openexr/include
EXRLIB = /path/to/openexr/lib
EXRLDFLAGS = -L$(EXRLIBS)/libHalf.a -L$(EXRLIBS)/libIex.a -L$(EXRLIBS)/libIlmImf.a -L$(EXRLIBS)/libImath.a

CXXFLAGS = -O2 -fPIC \
           -I$(NR_SHAKE_LOCATION)/sdk/include/nrcc \
           -I$(NR_SHAKE_LOCATION)/sdk/include/nrfx \
           -I$(NR_SHAKE_LOCATION)/sdk/include/nrgl \
           -I$(EXRINC)

LDFLAGS = -L$(NR_SHAKE_LOCATION)/lib \
           -lnrui_lx -lnrgl_lx -lnrcc_lx -lnrzl_lx -lm \
           $(EXRLDFLAGS)

all: exrFormat.so

clean:
        rm -f *.o *.so

exrFormat.so: exrFormat.C exrFormat.h
              @echo "Using $(NR_SHAKE_LOCATION)"
              $(CXX) $(CXXFLAGS) exrFormat.C -c -o exrFormat.o
              $(CXX) -shared -o exrFormat.so exrFormat.o $(LDFLAGS)

dist:
        mkdir OpenEXR_Shake-1.0
        cp -Rp  Makefile README exrFormat.C \
                exrFormat.h mac/English.lproj/InfoPlist.strings \
                mac/English.lproj/locversion.plist \
                mac/exrFormat.pbproj/project.pbxproj \
                mac/Info.plist mac/version.plist \
                OpenEXR_Shake-1.0
        tar -zcvf OpenEXR_Shake-1.0.tar.gz OpenEXR_Shake-1.0 && \
                rm -rf OpenEXR_Shake-1.0

-- end rough makefile template --

--
-[dg]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Derek Gerstmann                             address@hidden
MSc Computer Animation                   NCCA - Bournemouth University
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=




reply via email to

[Prev in Thread] Current Thread [Next in Thread]