Video Call
  • iOS
  • Android
  • Web
  • Flutter
  • React Native
  • Electron
  • Unity3D
  • Cocos Creator
  • Windows
  • macOS
  • Linux : C++
  • Overview
  • Develop your app
    • Integrate the SDK
    • Implement a basic video call
    • Enhance basic feature
      • Config your video based on scenes
  • Upgrade using advanced features
    • Advanced features
      • Configure the video
        • Beautify & Change the voice
      • Improve video quality
        • Configure bandwidth management
        • Visualize the sound level
        • Monitor streaming quality
      • Message signaling
        • Convey extra information using SEI
        • Broadcast real-time messages to a room
        • Quotas and limits
      • Play media files
        • Play media files
        • Play sound effects
    • Distincitve features
      • Join multiple rooms
      • Customize the video and audio
      • Use the bit mask
  • Resources & Reference
    • SDK
    • Sample codes
    • API reference
      • Client APIs
      • Server APIs
    • Debugging
      • Error codes
    • FAQs
    • Key concepts
  • Documentation
  • Video Call
  • Develop your app
  • Integrate the SDK

Integrate the SDK

Last updated:2023-03-09 16:58

Set up the development environment

Before integrating the ZEGO Express SDK, make sure the development environment meets the following requirements:

  • Any Linux distro with GLIBC 2.16 or above, supporting x86_64, aarch64, armhf, armel architectures
  • libasound (ALSA)
  • libv4l2 (v4l utils)
  • CMake 3.7 or later
  • The SDK depends on libasound (ALSA) and libv4l2 (v4l utils).
  • CentOS (RHEL/Fedora) can be installed by executing yum install alsa-lib-devel libv4l-devel command.
  • Ubuntu (Debian/Deepin) can be installed by executing apt install libasound2-dev libv4l-dev command.
  • For other platforms and systems, please install them by yourself.
  • If you need to cross-compile, you can refer to How to cross-compile alsa-lib and How to cross-compile v4l-utils. Note that the target machine also needs to have libasound and libv4l2 dependencies installed.

When using Qt + qmake to integrate the SDK, the version of the Qt you use must be 5.9 - 5.15. For more details, refer to Getting Started with Qt.

Integrate the SDK

  1. Download the latest version of the SDK. For more details, see SDK downloads.

  2. Extract files from the downloaded SDK package, and copy the files under the release/Library directory to your project.

  • When using CMake to integrate the SDK, import the SDK as follows:

    Import the SDK in the CMakeLists.txt file of your project.

    cmake_minimum_required(VERSION 3.7)
    project(MyAwesomeProject)
    
    # Add header search path
    include_directories("./libs/zego/include")
    # Add lib search path
    link_directories("./libs/zego")
    # Link SDK
    link_libraries(ZegoExpressEngine rt)
    
    add_compile_options(
    -std=c++11
    )
    
    aux_source_directory(./src SRC_LIST)
    
    add_executable(MyAwesomeProject ${SRC_LIST})
  • When using Qt + qmake to integrate the SDK, import the SDK as follows:

    Add the following to the <project_name>.pro file of your project to import the SDK library and header file.

    unix {
        contains(QT_ARCH, arm64) {
            INCLUDEPATH += $$PWD/../libs/ZegoExpress/linux/aarch64/include
            DEPENDPATH  += $$PWD/../libs/ZegoExpress/linux/aarch64/include
            LIBS += -L$$PWD/../libs/ZegoExpress/linux/aarch64 -lZegoExpressEngine
        } else:contains(QT_ARCH, arm) {
            INCLUDEPATH += $$PWD/../libs/ZegoExpress/linux/armhf/include
            DEPENDPATH  += $$PWD/../libs/ZegoExpress/linux/armhf/include
            LIBS += -L$$PWD/../libs/ZegoExpress/linux/armhf -lZegoExpressEngine
        } else { # Assume other archs are x86_64
            INCLUDEPATH += $$PWD/../libs/ZegoExpress/linux/x86_64/include
            DEPENDPATH  += $$PWD/../libs/ZegoExpress/linux/x86_64/include
            LIBS += -L$$PWD/../libs/ZegoExpress/linux/x86_64 -lZegoExpressEngine
        }
    }
Page Directory