Call the Linphone compiled by mingw in

Source: Internet
Author: User
Tags linphone

Because Linphone cannot be directly compiled with vs, but it is very convenient to compile with mingw, we can call the library compiled by mingw through. This solution is to create the Lib file required by vs from the DLL.
1. mingw compile linphone-3.5.2
Reference http://blog.csdn.net/gavinr/article/details/7337606

2. Create the Lib file required by
To create a Def file, use a third-party tool pexports. You can run the command mingw-Get install pexports in mingw to install the file.
$ Pexports liblinphone-4.dll> Linphone. Def
$ Pexports libmediastreamer-1.dll> mediastreamer. Def

Create a lib file and use the Lib program that comes with. Open the vs command line and execute the following operations:
E: \ Temp> lib/machine: x86/DEF: Linphone. Def
Microsoft (r) Library Manager version 9.00.21022.08
Copyright (c) Microsoft Corporation. All rights reserved.

Creating library Linphone. lib and object Linphone. Exp

Generate mediastream. Lib in the same way

3. vs test project
Vs2008 build a console project linphone-3.5.2, the test code directly uses the previous written test code (with vs compiled there will be a small error, the variable definition statement put at the beginning of the function): http://blog.csdn.net/gavinr/article/details/7344916

Add the dependent library mediastream. Lib Linphone. Lib

Add the header file directory, D: \ mingw \ msys \ 1.0 \ Local \ include

This compilation should be able to successfully generate the executable program linphone-3.5.2.exe.

4. Test
Because it relies on many other libraries, it is too lazy to find them in the mingw, so it is directly carried out in the mingw command line during testing.
Call remote SIP client
$ Linphone-3.5.2 SIP: 192.168.9.81
Ortp-error-fail to create class enumerator.
Ortp-warning-./share/sounds/Linphone/rings/oldphone.wav does not exist
Call state: Starting outgoing call
Unhandled notification 2
Call to sip: 192.168.9.81 is in progress... ortp-warning-cannot set noise gate mod
E to [0] because no volume send
Call state: outgoing call in progress
Unhandled notification 3
Ortp-warning-failed to open./share/sounds/Linphone/ringback.wav
Call state: Remote ringing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.