This document describes how to integrate the TRTC SDK to a PC.
You can download the complete demo code used in this document.
Download Demo Code
Open Visual Studio, click the File menu, and then select New -> Project -> Create a Project:
Create an empty project:
Add a cpp file to the project and write an empty main function:
Download iLiveSDK
Download iLiveSDK at Github
Copy files
Copy "include" and "libs" under the iLiveSDK directory to the directory where the solution file ".sln" is located:
Add the "include" directory
Add $(SolutionDir)include
to the project's additional include directory:
Add the library directory
Add $(SolutionDir)libs
to the project's additional library directory:
Note:
You must configure Debug and Release versions before adding the above include directory and library directory.
Include the header file:
Include the header file in the project and use the ilive namespace to load the lib file of the dynamic library:
#include "iLive.h"
using namespace ilive;
#pragma comment(lib, "iLiveSDK.lib")
Copy the dll file to the directory containing .exe:
Copy all the dll files in the libs directory to the solution's Debug and Release directories (both directories will not be generated until Debug and Release are compiled at least once), and then delete the dll files in the libs directory.
Note:
] Do not delete iLiveSDK.lib.
Verify whether the configuration is successful
Call GetILive() -> getVersion(). Then the current version number of iLiveSDK is returned.
cout << GetILive()->getVersion() << endl;
Error compiling demo source code:
Press [Ctrl + F5] to run the program, and then the version number displays:
You have successfully integrated iLiveSDK.
If you have any questions, send us an email to trtcfb@qq.com.
Was this page helpful?