Post by PatrickHello all,
newbie question...
how would I compile the code in the IlmImfExamples folder?
I know that I can have 'configure' to do this automatically but I'd like
to edit some of the .cpp files so it would be useful to know how to
compile it. I have tried but keep getting 'undefined reference to "some
name"' errors...
many thanks!
The commands for compiling and linking depend on the operating
system where you are building the examples. "configure" performs
a number of tests to determine what those commands are. If you
run "configure" and then "make", you can see the exact commands
used to compile and link the code. Below is what "make" prints
on my system; on yours the commands will probably be different.
Florian
--------
if g++33 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"OpenEXR\"
-DVERSION=\"1.2.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRERROR=1
-DHAVE_IOS_BASE=1 -DHAVE_COMPLETE_IOMANIP=1 -DHAVE_STL_LIMITS=1 -I. -I. -I..
-I../Iex -I../Half -I../Imath -I../IlmImf -pipe -march=i686 -g -O2 -MT main.o
-MD -MP -MF ".deps/main.Tpo" \
-c -o main.o `test -f 'main.cpp' || echo './'`main.cpp; \
then mv -f ".deps/main.Tpo" ".deps/main.Po"; \
else rm -f ".deps/main.Tpo"; exit 1; \
fi
...
/bin/sh ../libtool --mode=link g++33 -pipe -march=i686 -g -O2
-Wl,-rpath,/usr/lib/gcc-lib/i386-redhat-linux/3.3.2 -o imfexamples main.o
drawImage.o rgbaInterfaceExamples.o rgbaInterfaceTiledExamples.o
generalInterfaceExamples.o lowLevelIoExamples.o previewImageExamples.o
generalInterfaceTiledExamples.o -L../Iex -L../Half -L../Imath -L../IlmImf
-lIlmImf -lImath -lHalf -lIex -lz
g++33 -pipe -march=i686 -g -O2 -Wl,-rpath
-Wl,/usr/lib/gcc-lib/i386-redhat-linux/3.3.2 -o imfexamples main.o drawImage.o
rgbaInterfaceExamples.o rgbaInterfaceTiledExamples.o generalInterfaceExamples.o
lowLevelIoExamples.o previewImageExamples.o generalInterfaceTiledExamples.o
-L/src/OpenEXR/Iex -L/src/OpenEXR/Half -L/src/OpenEXR/Imath
-L/src/OpenEXR/IlmImf /src/OpenEXR/IlmImf/.libs/libIlmImf.a
-L/usr/src/redhat/BUILD/gcc-3.3.2/obj-i386-redhat-linux/i386-redhat-linux/libstdc++-v3/src
-L/usr/src/redhat/BUILD/gcc-3.3.2/obj-i386-redhat-linux/i386-redhat-linux/libstdc++-v3/src/.libs
-L/usr/src/redhat/BUILD/gcc-3.3.2/obj-i386-redhat-linux/gcc
/src/OpenEXR/Imath/.libs/libImath.a /src/OpenEXR/Half/.libs/libHalf.a
/src/OpenEXR/Iex/.libs/libIex.a /usr/lib/./libstdc++.so -lz -Wl,--rpath
-Wl,/usr/lib/. -Wl,--rpath -Wl,/usr/lib/.