describes how to compile the OpenH323 code release. Note these instructions will
always refer to the latest snapshot available on the download page.
The OpenH323 source will have been compiled and tested under Linux
x86, and Windows NT. If it does not compile for you then the problem is likely to be a
setup/configuration problem with your system and not a problem with the source code
The libraries and applications should also compile on Windows
95/98, BeOS (thanks Yuri!), Linux PPC, FreeBSD
x86, OpenBSD x86 (thanks Roger!) and Solaris
Sparc & x86. They are not automatically compiled on every release however so there
could be problems, but the chances are that there aren't. Note also that not all of these
platforms may have ports of the sound interface.
We are also happy to port it to other Unix flavours providing
people out there can provide an account and a fair bit of disk space!
These instructions should contain all of the steps need. If you
have a problem, please double check that you have performed ALL of the steps below,
particularly setting the include file paths under MSVC. Some of the more common errors are
If you get a lot of compile or link errors, then the chances are
that you have missed something in the list. If you are positive that something is wrong
and you have followed the instructions, then send an e-mail to the mailing list, and we'll answer it for everyone to
Finally, the documentation for the library is included in the
header files, you can create HTML files from the source using the doc++ package available here.
The windows build instructions are only for Microsoft DevStudio
version 6 at this stage. If you have v5 then you may still build the system but you can
not use the DLL's (see FAQ for more info) and there is no guarentee of compatibility in
the future. If you have another compiler you are completely on your own!
Download the pwlib_1.xx.zip and openh323_1.x.zip
files from the OpenH323 download page.
Extract the pwlib_1.xx.zip file somewhere eg c:\,
making sure the directory structure is preserved.
Start MSVC (v5, v6 or v7 (.NET)). If you have another compiler
you are on your own! Add these folders to the Include Files path as follows:
In VisualStudio v5/6 go into the Tools menu, Options item, Directories tab.
In VisualStudio v7, go into the Tools menu, Options item. In the
Options dialog, open the Projects folder, VC++ Directories item. In the 'Show Directories
for:' list, select 'Include files'.
Add to the beginning of the Include files path (note the order is
If you have not included these variables
then you will get a warning during the build. You can safely ignore this warning.
Note you will need bison
and flex to compile the system. You can
get a copy or the binaries from here, follow the
instructions included. It may also be necessary to add this directory to the MSVC
In VisualStudio v5/6 open the pwlib.dsw file in the pwlib top
If you have the minimum library it will come up with several requests to
find .dsp files, just cancel past these.
In VisualStudio v7 open the pwlib.sln file in the pwlib top directory.
In VisualStudio v5/6 use the Batch Build command and build the
"ASNParser - Win32 Release", "pwtest - Win32 Release" and
"pwtest - Win32 Debug" targets. make sure all other targets are not
checked. Also make sure you have not checked the "Selection Only" check box.
In VisualStudio v7 use the Batch Build command. It seems as though the
batch build does not build dependent parts unless they're checked in the Build column. For
a test build, be sure all Projects are checked except ASNParser-debug, MergeSym-debug,
PacketVXD-release, PWRC-debug, and both XMLRPC.
Extract the contents of the openh323_1.x.zip
Use the OpenH323.dsw file to build the
Open H.323 and sample code. Use the "SimpH323 - Win32 Release" target and the
dependencies should build the OpenH323 DLL's.
Run the program, and you are on your own!
The Unix build instructions are only for GNU C++ v 2.95 or later.
If you have an earlier then you may still build the system but there is no guarentee of
compatibility in the future. If you have another compiler you are completely on your own!
Note 1: If you require support for the Quicknet
cards, then you will require the Linux Telephony component in kernel (2.2.14 or later) for
the Quicknet card support to work. You will also need the latest
Quicknet drivers for the Quicknet card support to work correctly.
Note 2: If you require video support, make sure
you have the latest video drivers installed for your card.
Download the pwlib_min_x.xx.tar.gz and openh323_1.xx.tar.gz
files from the OpenH323 download page.
Extract the pwlib_min_x.xx.tar.gz
somewhere, preferably in your home directory, eg:
tar -xzvf pwlib_min_1.14.tar.gz
This should result in a ./pwlib directory tree.
If you have not installed PWLib in your home directory (~/pwlib)
then you will have to define the environment variable PWLIBDIR to point to the correct
Also make sure you have added the $PWLIBDIR/lib
directory to your LD_LIBRARY_PATH environment variable if you intend to use shared
libraries (the default under Linux).
Build the debug and release versions of the PWLib library as
This may take some time. Note, you will need GNU
make (>=3.75), bison(>=1.25)
and flex (>=2.5.4) for this to compile, most Unix
systems have these packages.
WARNING: there is a bug in most of the
If you are getting huge numbers of errors from make then you are
probably not using the GNU make. FreeBSD and OpenBSD users must install gmake and use gmake
instead of make in these instructions. If the errors are during the compile, then
it is likely your platform is not supported, or you have incorrectly set the OSTYPE and
MACHTYPE variables. There will be a large warning printed about this, don't ignore it!
Extract the contents of the openh323_x.x.tar.gz file
tar -xzvf openh323_1.1alpha1.tar.gz
If you have not installed OpenH323 in your home directory (~/openh323)
then you will have to define the environment variable OPENH323DIR to point to the correct
Also make sure you have added the
$OPENH323DIR/lib directory to your LD_LIBRARY_PATH environment variable if you intend to
use shared libraries (the default under Linux).
Build the H323 bootstrap code. This will automatically build the
ASN compiler (in the $PWLIBDIR/tools/asnparser directory), though
this should have already been built previously. Enter:
This may take some time, especially with the h245_*.cxx and
h225.cxx files. You may also need to add more swap space - 64M of real memory and 64M of
swap might just be enough, if your machine does nothing else! Some people have
reported needing as much as 128M of swap - if your compiler bombs out with a "virtual
memory exhausted" error compiling h245_*.cxx and h225.cxx, then increase your swap
The result should be an executable called simph323, which will be built
in a directory dependent on the platform, eg obj_linux_x86_d. To run it, use the following command:
and you should get the usage help text.
Now you're on your own!
Here are common errors you might encounter for both Windows and
The file h235, h225.h, h245 etc are missing.
A number of files are generated files that are created
during the build process. If they are missing then something went wrong with the creation
of the asnparser or your installation of flex/bison.
The following error:
error in loading
shared libraries: libpt_linux_x86_r.so.1: cannot open shared object file: No
such file or directory
You have not set the LD_LIBRARY_PATH environment variable.
Below are examples for some common shells
LINK : fatal error LNK1181: cannot open input file "ptlib.lib"
Error executing link.exe.
You have not set the MSVC library paths correctly (Tools->Options->Directories).
The following error:
Performing Custom Build Step on
The name specified is not recognized as an
internal or external command, operable program or batch file.
Error executing c:\winnt\system32\cmd.exe.
You have not installed bison and flex correctly. Check that
they are named bison.exe and flex.exe and the directory they are
in is in the PATH environment variable. it may also be necessary to add this directory to
the MSVC executable path (Tools->Options->Directories).
The following error:
Performing Bison Step
c:\tools\share\bison.simple: No such file or directory
C:\PWLIB\TOOLS\ASNPAR~1\BISON.EXE: Cannot move asn_grammar_tab.c - No such file or
Cannot move asn_grammar_tab.h - No such file or directory
Indicates you have not installed bison correctly. In
particular the bison.simple file must be available to bison. Check the bison
documentation for details on this.
The following error:
: error C2061: syntax error : identifier 'RTP_DataFrame'
E:\VOIP\BetaOpenH323\openh323_1_1beta1\openh323\Include\codecs.h(261) : error C2143:
syntax error : missing ',' before '&'
E:\VOIP\BetaOpenH323\openh323_1_1beta1\openh323\Include\codecs.h(261) : error C2059:
syntax error : '&'
E:\VOIP\BetaOpenH323\openh323_1_1beta1\openh323\Include\codecs.h(304) : error C2653:
'RTP_DataFrame' : is not a class or namespace name
E:\VOIP\BetaOpenH323\openh323_1_1beta1\openh323\Include\codecs.h(304) : error C2146:
syntax error : missing ';' before identifier 'GetRTPPayloadType'
E:\VOIP\BetaOpenH323\openh323_1_1beta1\openh323\Include\codecs.h(304) : error C2501:
'PayloadTypes' : missing storage-class or type specifiers
E:\VOIP\BetaOpenH323\openh323_1_1beta1\openh323\Include\codecs.h(304) : warning C4183:
'GetRTPPayloadType': member function definition looks like a ctor, but name does not match
Indicates that you have not set the MSVC include path in
the correct order.
Attempting to compile GUI systems under Unix.
There are a number of partial implementations of the GUI
code in the $PWLIBDIR/src/pwlib directory tree. These are not required to get the OhPhone
application compiled. If you get those systems from the CVS then you are basically on your
own. Do not ask for support unless you intend to help with the implementation!