2 Building the Application
First, you need to have PWLib and H323 Plus (or OpenH323). We will not explain in detail how to get and compile the two libraries, see the instructions at Vox Gratia. A quick recipe for building the "noshared" targets on a Linux/Unix platform follows. We prefer the "noshared" build targets here because they are slightly easier to use. For example, you can transfer the binaries to another machine without having to install the PWLib and H323Plus/OpenH323 libraries.
- Put PWLib and H323Plus into your home directory, i.e. put PWLib into ~/pwlib and H323Plus into ~/h323plus (OpenH323 into ~/openh323, respectively). Rename the directories if you unpack them with different names.
- Go to ~/pwlib and run
- go to ~/h323plus (to ~/openh323, respectively) and run
To build both the debug and optimized versions of OpenH323 or H323 Plus, it is good to have 256 MB of RAM or more (which should not be a problem nowadays). If you do not have enough RAM and still wish to experiment with the software, try building only the debug version, using make debugnoshared .
Next, download the file oh323tut-1.1-1.tgz (or any newer version, see the downloads page) to a directory and unpack it using the command
tar -zxvf oh323tut-1.1-0.tgz
Enter the directory oh323tut-1.1-1 and build the application using make bothdepend; make bothnoshared. This will give you both the release and debug versions. If you do not need both, use either make optnoshared or make debugnoshared . If you have PWLib and H323Plus located somewhere else than ~/pwlib and ~/h323plus, you must set two shell variables (PWLIBDIR and OPENH323DIR) before compiling. The shell commands are:
You need to set at least OPENH323DIR if you are building tutorial version 1.1-1 or higher with OpenH323 because it's Makefile points to ~/h323plus by default.
The object files (*.o) and oh323tut executables (the release and debug version, respectively) will be created in subdirectories obj_linux_x86_r and obj_linux_x86_d. The names of the subdirectories may differ if your platform is not a Linux system on a x86-compatible processor.
The executables produced using the noshared targets already contain all the required code from PWLib and OpenH323. They however depend on several dynamic libraries — standard C library, standard C++ library, pthreads library, and a few others. If you want to see the full list of dependencies, run ldd oh323tut .
If you wish to use the tutorial application with Speex and GSM codecs, you either need to install the *_pwplugin.so files in /usr/local/lib/pwlib or set the path to codec plugins. The shell command for the latter is as follows:
Modify the path if you have compiled OpenH323 in a directory other than ~/openh323. If the application finds no plugins, it will only use the G.711 codecs.
Next: 3 Using the Application