![]() |
Building OpenH323 on Windows Craig Southeren Last updated 16 November 2004 |
Contents
1. Introduction
This document provides a thorough description of building OpenH323 using both MSVC 6 and VS.net 2003. These procedures are based on the procedures for building PWLib which must be completed before these steps can be performewd.
2. Prerequisites
You will need the following to compile OpenH323 from source code:
- Either MSVC 6 or VS.net 2003. Note that you cannot use the free VS.net 2003 available from Microsoft as support for configuring that compiler without the GUI has not yet been completed
- A compiled version of PWLib using the target environment. See this page for information on how to compile PWLib
- A copy of the OpenH323 source archive from the OpenH323 SourceForge download page or from CVS
- An archive extractor program that understand tar.gz files, and handles end of line characters correctly, like WinZIP
3. Download and install the OpenH323 source code
Download and extract the OpenH323 source code from the OpenH323 SourceForge download page. If extracting the source from an archive, it is important to use program that can correctly handle tar.gz files can correctly process end of line characters. We strongly recommend WinZIP - other programs may not correct process end of line characters and will cause problems in later stages.
For the purposes of this document, the directory that contains OpenH323 will be indicated as installdir\OPENH323
Select "Tools" from the "Options" menu, and add the following directories settings as required
- Add installdir\OPENH323\INCLUDE to the Include directory list
- Add installdir\OPENH323\LIB to the Executable directory list
- Add installdir\OPENH323\LIB to the Library directory list
See this document for how to set directories for your particular environment
Regardless of the environment you are using, there are a number of different projects that can be built. The basic OpenH323 library can be built in three different ways:
- Debug - full debug symbols and trace logging enabled. This provides the most information but is also generates the biggest output files
- Release - no debug symbols, but full trace logging. This is smaller than the Debug version, but still allows full trace output
- No Trace - no debug symbols, but no trace logging. This creates the smallest output files, but does not allow trace logging
The plugin codecs can only be built as Release versions, as the debug information cannot be used in run-time loadable modules
| Name | Description | Debug version | Release version | No trace version |
|---|---|---|---|---|
| OpenH323Lib | OpenH323 as a static library | openh323sd.lib | openh323s.lib | openh323sn.lib |
| OpenH323dll | OpenH323 as a dynamic library | openh323d.lib & openh323d.lib |
openh323.lib & openh323.lib |
openh323n.lib & openh323n.lib |
| G726 | G726 plugin audio codec | g726codec.dll | ||
| gsm0610 | GSM06.10 plugin audio codec | gsm0610.dll | ||
| ilbccodec | iLBC plugin audio codec | ilbccodec.dll | ||
| IMA_ADPCM | IMA_ADPCM plugin audio codec | IMA_ADPCM.dll | ||
| Speex | Speex plugin audio codec | speexcodec.dll | ||
| LPC_10 | LPC-10 plugin audio codec | LPC_10.dll | ||
| VoiceAgeG729 | G.729 plugin audio codec | VoiceAgeG729.dll |
The static library versions of OpenH323 can be built independently, but building the OpenH323 DLLs requires building the "MERGESYM" utility from the Release version of PWLib. The codec DLLs do not require mergesym
- Open the file installdir\OPENH323\OPENH323.DSW
- Make sure the "File view" tab is selected in the Workspace
- Select the build type as "Win32 Release", "Win32 Debug" or "Win32 No Trace" in the Build toolbar
-
Right-click on "OpenH323Lib files" and select "Build" from the menu to build openh323s.lib (or openh323sd.lib if you are building the "Win32 Debug" version, or openh323sn.lib if you are building the "Win32 No Trace" version). The following should be displayed (note that your output may vary if you have different options or build environment):
--------------------Configuration: OpenH323Lib - Win32 Release--------------------
Configuring Build Options
Searching C:\
Searching D:\
Located ffmpeg RFC2190 AVCODEC Library at D:\rfc2190avcodec.dll\
Audio Software Codecs enabled
Video System enabled
ffmpeg RFC2190 AVCODEC Library enabled
Quicknet Internet xJACK cards enabled
Configuration completed.
Compiling...
precompile.cxx
Compiling...
channels.cxx
...lines deleted...
transmitter.cxx
vid_coder.cxx
Generating Code...
Creating library...
OpenH323s.lib - 0 error(s), 0 warning(s)
- Right-click on "OpenH323dll files" and select "Build" from the menu to build openh323.lib and openh323.dll (or openh323d.lib and openh323d.dll if you are building the "Win32 Debug" version, or openh323n.lib and openh323n.dll if you are building the "Win32 No Trace" version). The following should be displayed (note that your output may vary if you have different options or build environment):
--------------------Configuration: OpenH323dll - Win32 Release--------------------
Merging exported library symbols
MergeSym version 1.4.0 on Windows 2000 by Equivalence
Compiling resources...
Compiling...
dllmain.cxx
Linking...
Creating library lib/OpenH323.lib and object lib/OpenH323.exp
Extracting debug symbols
REBASE: Total Size of mapping 0x00570000
REBASE: Range 0x30000000 -0x30570000
OpenH323.dll - 0 error(s), 0 warning(s)
- Open the file installdir\OPENH323\OPENH323.SLN.
- Make sure the "Solution explorer" window is displayed
- Select the build type as "Release", "Debug" or "No Trace" in the Build toolbar
-
Right-click on "OpenH323Lib" and select "Build" from the menu to openh323s.lib (or openh323sd.lib if you are building the "Win32 Debug" version, or openh323sn.lib if you are building the "Win32 No Trace" version). The following should be displayed (note that your output may vary if you have different options or build environment):
------ Build started: Project: OpenH323Lib, Configuration: Release Win32 ------
Configuring Build Options
Searching C:\
Searching D:\
Located ffmpeg RFC2190 AVCODEC Library at D:\rfc2190avcodec.dll\
Audio Software Codecs enabled
Video System enabled
ffmpeg RFC2190 AVCODEC Library enabled
Quicknet Internet xJACK cards enabled
Configuration completed.
Compiling...
precompile.cxx
Compiling...
vid_coder.cxx
transmitter.cxx
...lines deleted...
codecs.cxx
channels.cxx
Generating Code...
Compiling...
g711.c
Creating library...
Build log was saved at "file://d:\openh323\lib\Release\BuildLog.htm"
OpenH323Lib - 0 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 1 succeeded, 0 failed, 0 skipped
- Right-click on "OpenH323dll" and select "Build" from the menu to build openh323.lib and openh323.dll (or openh323d.lib and openh323d.dll if you are building the "Win32 Debug" version, or openh323n.lib and openh323n.dll if you are building the "Win32 No Trace" version). The following should be displayed (note that your output may vary if you have different options or build environment):
------ Build started: Project: OpenH323dll, Configuration: Debug Win32 ------
Merging exported library symbols
MergeSym version 1.4.0 on Windows 2000 by Equivalence
Compiling...
dllmain.cxx
Compiling resources...
Linking...
Creating library .\lib\OpenH323.lib and object .\lib\OpenH323.exp
Build log was saved at "file://d:\openh323\lib\Release\BuildLog.htm"
OpenH323dll - 0 error(s), 1 warning(s)
---------------------- Done ----------------------
Build: 1 succeeded, 0 failed, 0 skipped
6. Compiling and installing audio codecs
Plugin codecs are compiled from separate projects that each create a single DLL file. When compiled in Release mode, the final codec DLLs will be located in installdir\OPENH323\PLUGINS\RELEASE.
In order to allow OpenH323 applications to find these codecs, it is necessary to do one of two things:
- Copy the codec DLLs to the directory default plugin directory, which is C:\PWLIB_PLUGINS
- Set the environment variable PWLIBPLUGINDIR to the directory contain the codecs are located. Note that this environment variable can contain more than one directory, with each directory name separated by ";" characters
See http://www.voxgratia.org/docs/codec_plugins.html for more information on the plugin audio codecs
7. Installing the RFC 2190 H.263 video codec
The RFC 2190 H.263 codec will only be supported if the appropriate files are found by the configure process when OpenH323 is compiled. The appropriate files can be download from here and installed into a directory such as C:\RFC2190.
If installed correctly, the OpenH323 configure process will display the following messages during compilation
Configuring Build Options
Searching C:\
Searching D:\
Located ffmpeg RFC2190 AVCODEC Library at C:\RFC2190\ <----- HERE
Audio Software Codecs enabled
Video System enabled
ffmpeg RFC2190 AVCODEC Library enabled <----- HERE
...lines deleted...
--------------------Configuration: OpenH323Lib - Win32 Debug--------------------
Compiling...
precompile.cxx
Compiling...
channels.cxx
codecs.cxx
ffh263codec.cxx
gkclient.cxx
Non-standard H.263 codecs disabled as RFC2190 H.263 is enabled <----- HERE
gkserver.cxx
guid.cxx
The libavcodec.dll provided as part of the precompiled package is loaded at run-time to provide the RFC 2190 H.263 functions. OpenH323 applications will use the same search method for this file as described above for audio codec plugins. This means that you must:
- Copy libavcodec.dll to the default plugin directory, which is C:\PWLIB_PLUGINS
- Set the environment variable PWLIBPLUGINDIR to the directory contain the codecs are located. Note that this environment variable can contain more than one directory, with each directory name separated by ";" characters
If the libavcodec.dll file cannot be found at run-time, the following text will appear on the console:
Cannot find libavcodec.dll as required for RFC2190 H.263 video codec.
This function may appear to be installed, but will not operate correctly.
Please put the file libavcodec.so into one of the following directories:
C:\PWLIB_PLUGINS
This list of directories can be set using the PWLIBPLUGINDIR environment
Further information on the RFC 2190 H.263 codec can be found at http://www.voxgratia.org/docs/h263_codec.html
8. Using VS.net from the command line
The VS.net compiler can be invoked from the command line without the GUI using the "devenv" program with the /build option. To do this, open a command window using the "Open Visual Studio .NET 2003 Command Prompt" shortcut or open a normal command window and execute the correct "vcvars32.bat" file.
The following command shows how to build the "OpenH323" project in Debug mode using the openh323.sln solution file:
devenv /build Debug /project "OpenH323" openh323.sln
The following command will build all of the OpenH323 projects in Debug mode using the openh323.sln solution file:
devenv /build Debug openh323.sln
Change History
| 16 November 2004 | Craig Southeren | Added command line build information |
| 10 June 2004 | Craig Southeren | Initial version |
Copyright © 2003-2005 by Post Increment A.B.N 95 856 785 279
All Rights Reserved
All trademarks and copyrights on this page are owned by their respective owners.

浙公网安备 33010602011771号