Contents
- Introduction
- Prerequisites
- Download and install the OPAL source code
- Open the solution file
- Configure directories
- Build the
OPAL Static project
- Build the
OPAL_dll project
- Build the samples
1. Introduction
This document provides a thorough description of the building PTLib for Visual Studio on Windows.
Support for MSVC 6 is no longer maintained as it is very old and contains bugs that cause many problems. While Windows 2000 may work for builds and running executables, it is expected that at least Windows XP would be used and no gurantees are made the future versions.
2. Prerequisites
You will need the following:
- A compiled PTLib installation (see Compiling PTLib)
- VS.net 2003, VS.net 2005, Visual C++ 2005 Express Edition, VS.net 2008 or Visual C++ 2008 Express Edition.
- Note that you cannot use the free VS.net 2003 available from Microsoft as building without the IDE is not supported.
- If using SVN download, Tortoise SVN is highly recommended.
- There are a number of optional downloads for extra features, for example SRTP. OPAL will automatically detect if these are installed and compile the system accordingly.
3. Download and install the OPAL source code
Download and extract the OPAL source code. For the purposes of this document, the directory that contains Opal will be indicated as installdir\OPAL
The OPAL source may be downloaded as a ZIP file from the SourceForge download page or you may download it using Subversion
4. Open the solution file
If you are using VS.net 2003, open the opal.sln solution file.
If you are using VS.net 2005, open the opal_2005.sln solution file.
If you are using VS.net 2008, open the opal_2008.sln solution file.
The solution contain the following projects:
OPAL Static
OPAL_dll
PTLib DLL
PTLib Static
Simple OPAL DLL
Simple OPAL Static
5. Configure directories
Once Visual Studio is started, select "Tools" from the "Options" menu, then open the "Projects and Solutions" element in the tree on the left, and finally select the "VC++ Directories" entry. Add the following directories settings:
* Add installdir\OPAL\INCLUDE to the Include directory list
* Add installdir\OPAL\LIB to the Library directory list
Note: for Windows Mobile, make sure you also set those platforms, see Notes on Windows Mobile
6. Build the OPAL Static project
Build the OPAL Static project to create a static code library containing all of the OPAL code.
In Release mode, this will build the opals.lib file. In Debug mode, this will build the opalsd.lib file.
7. Build the OPAL_dll project
The OPAL Static project must be built before building Opal_dll. Thist should happen automatically through the solution file dependencies, if something goes wrong you can do it manually to be sure.
Build the OPAL_dll project to create a DLL code library containing all of the Opal code.
In Release mode, this will build the opal.dll file. In Debug mode, this will build the opald.dll file.
8. Build the samples
To build some of the samples you may open open the opal_samples_XXXX.sln solution file, where XXX is 2003, 2005 or 2008 as appropriate. There a number of sample and utility applications here that may be compiled as you desire.