From OpalVoipWiki

Main: Building PTLib on Windows

Contents

  1. Introduction
  2. Prerequisites
  3. Download and install the PTLib source code
  4. Open the solution file
  5. Install optional packages
  6. Build the PTLIB Static project
  7. Build the PTLIB DLL project
  8. Tailoring the configure search path

Introduction

This document provides instructions building PTLib with Visual Studio on Windows.

Prerequisites

You will need the following:

3. Download and install the PTLib source code

From within Visual Studio 2019/2022, you can use it's built in `git` to clone the repository git://git.code.sf.net/p/opalvoip/ptlib.

Alternatively, you can download and extract the PTLib source code. For the purposes of this document, the directory that contains PTLib will be indicated as installdir\PTLib

The PTLib source may also be downloaded as a ZIP file from the SourceForge download page.

Open the ptlib_2019.sln or ptlib_2022.sln solution file based on your version of Visual Studio.

The solution contains the following projects:

There is also PTLib_samples_*.sln which contains the base library and many samples/test applications.

Both 32 and 64 builds are available in the solutions, though these days the 32 bit version is rarely tested.

Install optional packages

The PTLib build process will automatically detect many packages that are installed on the host system. Before starting the build process, select and install the packages from the list below that are needed:

Build the PTLib Static project

Build the PTLib Static project to create a static code library containing all of the PTLib code. In Release mode, this will build the ptlibs.lib file. In Debug mode, this will build the ptlibsd.lib file.

Note that the first step of the build is the execution of the configure program which searches for optional components that may be installed on the host system.

Build the PTLib DLL project

Build the PTLib DLL project to create a DLL code library containing all of the PTLib code. In Release mode, this will build the ptlib.dll file. In Debug mode, this will build the ptlibd.dll file.

NOTE: the Release version of the MergeSym project must be built *before* building PTLib DLL. Generally this will happen automatically through the solution dependencies, however if this does not occur and you get an error such as:


    'MergeSym' is not recognized as an internal or external command, operable program or batch file.

then right click on MergeSym project and build it manually.

Retrieved from http://wiki.opalvoip.org/index.php?n=Main.BuildingPTLib
Page last modified on October 03, 2022, at 09:47 AM