The library is compiled by using the Makefile included in the sources, which will need just a little editing to adjust it to the platform used:
Supposing the derived class is declared in MyClass.h and implemented in MyClass.cpp, you can generate a binary object file with the following command:
g++ -O -c -I/usr/local/SndObj/include -oMyClass.o MyClass.cpp
This assumes that: a) the SndObj distribution directory is /usr/local/SndObj, b) a #include "MyClass.h" was added at the top of the MyClass.cpp file and c) g++ is the compiler being used.
The derived class is now compiled in MyClass.o
This supposes the application is called MyApp and its source file is MyApp.cpp. The SndObj distribution is, again, located in /usr/local/SndObj and the compiler is g++. If you are using realtime audio or midi, you will also have to include one of: -DWIN, -DOSS or -DSGI. This will depend on the platform you are using. Also, if you choose -DWIN, you will also need a -lwinmm at the end. In the case of -DSGI, you will need at least -lm,-laudio for realtime audio and -lmd for MIDI. If you are using a SndThread object, you will also need a -lpthread (SGI and OSS). On OSS you will also need need -DOSS (instead of -DSGI or -DWIN, and, of course, -lsndobj):
g++ -O -oMyApp -I/usr/local/SndObj/include -DOSS MyApp.cpp
-L/usr/local/SndObj/lib -lsndobj -lpthread
In case the derived class MyClass compiled above is used, then all you have to do is to add MyClass.o to the arguments above (not forgeting to include the relevant header file in MyApp.cpp):
g++ -O -oMyApp -I/usr/local/SndObj/include -DOSS MyApp.cpp MyClass.o
-L/usr/local/SndObj/lib
-lsndobj
SndObj Library version 2.0
© Victor Lazzarini, 2001
Music Technology Laboratory
NUI Maynooth