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++
  • The pkg-config package management tool. To install, you may either do the following:
    curl -O http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
    tar -xzvf pkg-config-0.23.tar.gz
    cd pkg-config-0.23
    ./configure
    make
    sudo make install
  • or (highly recommended) install macports from http://www.macports.org/install.php and execute
    sudo port install pkgconfig
  • Optionally (also recommended for full functionality)
    sudo port install autoconf automake expat openssl openldap cyrus-sasl2 unixODBC ncurses lua libsdl2 ffmpeg-devel gstreamer1-gst-libav 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/Work/ptlib
   export DYLD_LIBRARY_PATH=${PTLIBDIR}/lib_Darwin_x86_64
   export PTLIBPLUGINDIR=${PTLIBDIR}/lib_Darwin_x86_64/devices
   export PKG_CONFIG_PATH=${PTLIBDIR}

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 December 14, 2017, at 12:48 PM