Linking error using Linux Video SDK

Hi,

I’m having linking issues with the Linux SDK.

My zoom sdk is in lib/zoom_video_sdk.

My main.cpp contains the following:

#include "helpers/zoom_video_sdk_user_helper_interface.h"
#include "zoom_video_sdk_api.h"
#include "zoom_video_sdk_def.h"
#include "zoom_video_sdk_delegate_interface.h"
#include "zoom_video_sdk_interface.h"

USING_ZOOM_VIDEO_SDK_NAMESPACE
IZoomVideoSDK *video_sdk_obj;

int main() {
    video_sdk_obj = CreateZoomVideoSDKObj();
    ZoomVideoSDKInitParams init_params;
    init_params.domain = "https://go.zoom.us";
    init_params.enableLog = true;
    init_params.logFilePrefix = "zoom_videosdk_demo";
    init_params.videoRawDataMemoryMode = ZoomVideoSDKRawDataMemoryModeHeap;
    init_params.shareRawDataMemoryMode = ZoomVideoSDKRawDataMemoryModeHeap;
    init_params.audioRawDataMemoryMode = ZoomVideoSDKRawDataMemoryModeHeap;
    init_params.enableIndirectRawdata = false;

    ZoomVideoSDKErrors err = video_sdk_obj->initialize(init_params);
    if (err != ZoomVideoSDKErrors_Success)
    {
        return 0;
    }
}

But linking

 g++ -Ilib/zoom_video_sdk/h -Llib/zoom_video_sdk -Wall main.cpp -o main

Simply fails with

/usr/bin/ld: /tmp/cc7gcKVI.o: in function `main':
main.cpp:(.text+0x9): undefined reference to `CreateZoomVideoSDKObj'
collect2: error: ld returned 1 exit status

Are we sure CreateZoomVideoSDKObj is in those 4 so files?

# ls -l lib/zoom_video_sdk/ | grep .so
-rw-rw-r--  1 root root  1334152 Oct  6 17:29 libfdkaac2.so
-rw-rw-r--  1 root root  1182984 Oct  6 17:29 libmpg123.so
-rw-rw-r--  1 root root   645432 Oct  6 17:29 libturbojpeg.so
-rw-rw-r--  1 root root 82403200 Oct  6 17:29 libvideosdk.so

Sam

Finally found the issue.

I had to add the library I needed with target_link_libraries(<project name> videosdk)

My whole CMakeLists.txt file looks like this now:

cmake_minimum_required(VERSION 3.9.1)
project(zoomintegration)

include_directories(${CMAKE_SOURCE_DIR}/sdk/h)
link_directories(${CMAKE_SOURCE_DIR}/sdk)

add_executable(zoomintegration main.cpp)

target_link_libraries(zoomintegration videosdk)

where zoomintegration is the name of my project.

Thanks @sam.decrock for sharing your solution!