COMPILING A TSMAPI PROGRAM
This tutorial describes how you can compile programs that have been developed with the tsmApi library. As of tsmApi 2.1, there are 11 library files that are part of the tsmApi distribution. These are:
TARGET = make_geovrml.c
TSMN32 = tsmApi-2.1/irix-6.5-n32-inst
TSMO32 = tsmApi-2.1/irix-6.5-o32-inst
TSMSOL = tsmApi-2.1/solaris-5.6-inst
TSMWIN = tsmApi-2.1/mingw32-inst
IRIXLIBS = -ltsmApi -lgeotiff -lungif -lghttp -lxml -lvrml2 -lpthrutil \
-ltiff -ljpeg -lz -lnspr4 -lc -lpthread -lm
SUNLIBS = -ltsmApi -lgeotiff -lungif -lghttp -lxml -lvrml2 -lpthrutil \
-ltiff -ljpeg -lz -lnspr4 -ldl -lsocket -lnsl -lposix4 \
-lc -lpthread -lm
WINLIBS = -ltsmApi -lgeotiff -lungif -lghttp -lxml -lvrml2 -lpthrutil \
-ltiff -ljpeg -lz -lnspr4 -lwsock32 -lwinmm -lm
irix-n32:
cc -n32 $(TARGET) -I$(TSMN32)/include -o $(TARGET:.c=) \
-L$(TSMN32)/lib $(IRIXLIBS)
irix-o32:
cc $(TARGET) -I$(TSMO32)/include -o $(TARGET:.c=) \
-L$(TSMO32)/lib $(IRIXLIBS)
cygwin:
gcc $(TARGET) -I$(TSMWIN)/include -o $(TARGET:.c=.exe) \
-L$(TSMWIN)/lib $(WINLIBS)
solaris:
gcc $(TARGET) -I$(TSMSOL)/include -o $(TARGET:.c=) \
-L$(TSMSOL)/lib $(SUNLIBS)
clean:
rm -f *~ $(TARGET:.c=)
After this, you should have a binary called foo which you can
run. Note that we linked against all of the tsmApi libraries, the DPSS
libraries, and a couple of system libraries (pthread and math).
Martin Reddy,
<reddy@ai.sri.com> /
Yvan Leclerc,
<leclerc@ai.sri.com>
Last modified: Thu Jan 11 14:47:03 PST 2001