1、下載https://gitlab.linphone.org/BC/public/linphone-sdk 源碼
git clone https://gitlab.linphone.org/BC/public/linphone-sdk.git --recursive
需要在執行cmake時候加上-DENABLE_CSHARP_WRAPPER=ON (c#包裝類)
成功後在build 目錄linphone-sdk
以下是readme配置
Windows
SDK compilation is supported on Visual Studio 15 2017. Setting the build environment on Windows is a bit tricky. In addition to the common components listed above, these components must be installed:
- MinGW (select all installer options except Ada and Fortran)
- Yasm:
- download yasm-1.3.0-win32.exe
- copy it to a
bin
directory of your user directory, - rename yasm-1.3.0-win32.exe as yasm.exe
Visual Studio must also be properly configured with addons. Under "Tools"->"Obtain tools and features", make sure that the following components are installed:
- Tasks: Select Windows Universal Platform development, Desktop C++ Development, .NET Development
- Under "Installation details". Go to "Desktop C++ Development" and add "SDK Windows 8.1 and SDK UCRT"
- Individual component: Windows 8.1 SDK
Finally add your user bin
directory and C:\Mingw\bin
to the PATH environement variable from windows advanced settings.
2.創建c# winform導入包裝類 和dll
創建Core開始
Core core = Factory.Instance.CreateCore(new CoreListener() { }, "linphonerc", "linphonerc-factory");
更多代碼參加爲win32的寫法https://blog.csdn.net/Java_lilin/article/details/89211064
你要覺得麻煩或難解決錯誤可到https://item.taobao.com/item.htm?id=592349919838獲取源碼。源碼功能性更好、更完善。交流羣:261074724)