Recent Changes - Search:

Documents

Download

Building

Support

Wiki Stuff

edit SideBar

Building PTLib on MacOSX

This page describes how to build PTLib revision 2.8.x (Sirius) or later as of 8 April 2010 Earlier versions of PTLib had only partial MacOSX support and may required patches

Contents

  1. Introduction
  2. Prerequisites
  3. Compiling
  4. Build and use without install

1. Introduction

Building PTLib from source is almost to identical to building from source on other Unix platforms

There are additional prerequisites and OSX-specific features to be aware of.

2. Prerequisites

You will need the following.

  • The Apple developer tools (Xcode and friends) from http://developer.apple.com. This package includes the Apple version of gcc and g++
  • Install Home Brew from https://brew.sh
  • Optionally (also recommended for full functionality)
    brew install autoconf automake expat openssl openldap unixodbc lua v8 sdl2 ffmpeg gstreamer imagemagick wxwidgets@3.0

3. Buildling

Set the PTLIBDIR environment variable to point to srcdir as follows. This allows other libraries that use PTLib to find the code without using pkg-config.

IMPORTANT: you must set the environment variable before executing the configure script or the system will get very confused.

It is also necessary to set the DYLD_LIBRARY_PATH environment variable so that programs can find the PTLib libraries at link or run time. If you are using plugins, the PTLIBPLUGINDIR environment variable also must be set to the location of the compiled plugins. Finally, it is usually the case that pkg-manager needs to know where PTLib is too. Thus, typically it is:

   export PTLIBDIR=$HOME/Wherever/ptlib
   export DYLD_LIBRARY_PATH=${PTLIBDIR}/lib_Darwin_`uname -p`
   export PTLIBPLUGINDIR=${PTLIBDIR}/lib_Darwin_`uname -p`/devices
   export PKG_CONFIG_PATH=${PTLIBDIR}:/opt/homebrew/opt/openssl@1.1/lib/pkgconfig:/opt/homebrew/opt/openldap/lib/pkgconfig

Once this is done, you can build the system by simply going:

  cd $PTLIBDIR
  make
Edit - History - Print - Recent Changes - Search
Page last modified on October 02, 2022, at 03:31 PM