[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] Makefiles, OpenEXR, and OS X
From: |
Drew Hess |
Subject: |
Re: [Openexr-devel] Makefiles, OpenEXR, and OS X |
Date: |
Mon, 26 Jan 2004 02:51:17 -0800 (PST) |
Hey Brian,
Looks like you're missing the actual libs to link (-lIlmImf etc.). Use
pkg-config, it'll do all the dirty work for you, as long as you installed
OpenEXR someplace where pkg-config will look. I think that if you change
your CFLAGS and LDFLAGS like so:
CFLAGS = -g `pkg-config --cflags OpenEXR`
LDFLAGS = -g `pkg-config --libs OpenEXR'
that should take care of your OpenEXR linking problems.
-dwh-
On Sat, 24 Jan 2004, Brian Clark wrote:
> I am trying to compile a program on OS X using OpenEXR from the command
> line, via makefile, as opposed to Xcode. This same code compiles with
> Xcode, but gives me errors during the linking stage (I think) when I
> try to use a makefile.
>
> I am not very familiar with makefiles. I've always just appropriated a
> makefile from elsewhere when I needed one. But I must have an include
> messed up somewhere. Does anyone have a suggestion of what's going
> wrong with the following makefile?
>
> CC = g++
> LD = g++
> INCDIR = /usr/X11R6/include/ -I/usr/local/include/OpenEXR/
> -I/usr/local/lib
> CFLAGS = -g
> LDFLAGS = -g -lm -L/usr/local/include/OpenEXR/ -L/usr/local/lib
>
> OBJS = Vector.o Utility.o Camera.o Caustic.o Color.o Distant.o
> ImageClass.o Light.o Parser.o Plane.o Point.o PolyObj.o Ray.o Shape.o
> Sphere.o Texture.o Triangle.o VolumeObj.o World.o main.o
>
> PROG = HDRRaytracer
>
> $(PROG): $(OBJS)
> $(LD) $(LDFLAGS) $(OBJS) -o $(PROG)
>
>
> %.o: %.cpp
> $(CC) $(CFLAGS) -I$(INCDIR) -c $< -o $*.o
>
> clean:
> rm *.o
>
> When I run it, I get the following message:
>
> ld: warning prebinding disabled because of undefined symbols
> ld: Undefined symbols:
> Imf::RgbaOutputFile::writePixels(int)
> Imf::RgbaOutputFile::setFrameBuffer(Imf::Rgba const*, unsigned long,
> unsigned long)
> Imf::RgbaOutputFile::RgbaOutputFile[in-charge](char const*, int, int,
> Imf::RgbaChannels, float, Imath::Vec2<float>, float, Imf::LineOrder,
> Imf::Compression)
> Imf::RgbaOutputFile::~RgbaOutputFile [in-charge]()
> half::_eLut
> half::convert(int)
> make: *** [HDRRaytracer] Error 1
>
> ImfRgbaFile.h, which includes writePixels(int) is in the
> /usr/local/include/OpenEXR/ path, which I have included in the LDFLAGS
> and the INCDIR (not really sure if I'm being redundant or not), but it
> doesn't work.
>
> Comments?
> Suggestions?
> Ideers?
> Strategery?
>
> Thanks,
> bc
- [Openexr-devel] Makefiles, OpenEXR, and OS X, Brian Clark, 2004/01/24
- Re: [Openexr-devel] Makefiles, OpenEXR, and OS X, Henti Smith, 2004/01/24
- Re: [Openexr-devel] Makefiles, OpenEXR, and OS X,
Drew Hess <=
- Re: [Openexr-devel] Makefiles, OpenEXR, and OS X, Drew Hess, 2004/01/26
- Re: [Openexr-devel] Makefiles, OpenEXR, and OS X, Brian Clark, 2004/01/26
- [Openexr-devel] Reading incomplete exr, Ken McGaugh, 2004/01/26
- Re: [Openexr-devel] Reading incomplete exr, Florian Kainz, 2004/01/26
- Re: [Openexr-devel] Reading incomplete exr, Ken McGaugh, 2004/01/28
- Re: [Openexr-devel] Reading incomplete exr, Florian Kainz, 2004/01/28