Installation

A zip archive of the SDK of Linphone is available on linphone.org. It contains all the files you need to develop an application based on liblinphone.

Documentation

Liblinphone API reference documentations is available for each supported language.

Compilation

In this section we propose you to build the "Basic Call" tutorial with Visual Studio 2013.

Create a project

  • To create a project, go to "File" menu -> New -> Project...
  • Select the "Win32 Console Application" template in the section "Visual C++" -> "Win32" and give a name to your project e.g. "Liblinphone tutorial". Next click "Ok".
  • Now, the wizard for Win32 Applications comes out. Click "Next", check the "Empty project" box and click "Finish".
  • You should now have a project called "Liblinphone tutorial" and a new target identically named. You may rename this target into "Basic call".

Configure a project to use liblinphone

  • Download the ZIP archive of linphone SDK and extract it into your Visual Studio project directory. In our case, it is placed in Documents\Visual Studio 2013\Projects\Liblinphone tutorial\Liblinphone tutorial. Be care to name the extracted directory as "liblinphone".
  • In Visual Studio, right click on the "Basic call" target and click on "Properties"
  • Go to "C/C++" section and then "General". Add the directory "liblinphone/include" in the "Additonal Include Directory" field by using the editing wizard.
  • Go to "Linker" -> "General" section and add the "liblinphone/lib" directory to "Additional Library Directories".
  • Go to "Linker" -> "Input" section and add the folowing libraries into "Additional Dependencies":
ortp.lib
mediastreamer_base.lib
mediastreamer_voip.lib
linphone.lib

Compiling

Add the file called name.c in the source files of your target and fill it with the source code of the  Basic call tutorial

You can now build your project by right clicking on the target to build and clicking on "Build".

Executing and debuging

To be able to execute the generated binary file, the PATH environment variable needs to be set. Go to the property panel of the target and then in the "Debugging" section. Edit the environment field and add the following line:

PATH=C:\Users\<user_name>\Documents\Visual Studio 2013\Projects\Liblinphone tutorial\Liblinphone tutorial\liblinphone\bin;%PATH%

The "Basic call" program needs a SIP address as argument. You can specify it by editing the "Command argument" field. For instance, you may write ''sip:bot.linphone.org''.

You can now execute the program by clicking on the "Local Windows Debugger" in the main interface.

 Mediastreamer loads its plugins relatively to the root of the SDK. If you need features provided by such plugins, for example the support of OpenH264, you may set the working directory to the location of the SDK. That can be done by going into the "Debuging" section in the property of your project.
Created by SandrineAvakian on 2017/02/22 16:28