tencent cloud

Feedback

PC

Last updated: 2018-09-28 17:01:18
The documentation is not available now.

    This document describes how to integrate the TRTC SDK to a PC.

    Downloading Source Code

    You can download the complete demo code used in this document.
    Download Demo Code

    Procedure

    Create a Win32 Console project

    1. Open Visual Studio, click the File menu, and then select New -> Project -> Create a Project:

    2. Create an empty project:

    3. Add a cpp file to the project and write an empty main function:

    Integrate iLiveSDK

    1. Download iLiveSDK
      Download iLiveSDK at Github

    2. Copy files
      Copy "include" and "libs" under the iLiveSDK directory to the directory where the solution file ".sln" is located:

    3. Add the "include" directory
      Add $(SolutionDir)include to the project's additional include directory:

    4. 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.

    5. 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")
      
    6. 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.

    7. Verify whether the configuration is successful
      Call GetILive() -> getVersion(). Then the current version number of iLiveSDK is returned.

      cout << GetILive()->getVersion() << endl;
      

    Source code description

    • Error compiling demo source code:

      • Possibly because the 64-bit version is selected in project configuration.

        iLiveSDK is not supported on the 64-bit version. Change it to 32-bit.

    Execution results

    Press [Ctrl + F5] to run the program, and then the version number displays:

    You have successfully integrated iLiveSDK.

    Email

    If you have any questions, send us an email to trtcfb@qq.com.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support