Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compiled the C++ SDK (4.4.0) on Window #406

Open
zardamhussain opened this issue Oct 6, 2024 · 0 comments
Open

Failed to compiled the C++ SDK (4.4.0) on Window #406

zardamhussain opened this issue Oct 6, 2024 · 0 comments

Comments

@zardamhussain
Copy link

Im using the windows 11, GCC version 13.2.0 and cmake version 3.30.4

CMakeList.txt

cmake_minimum_required(VERSION 3.30.4)
project(agora)

set(AGORA_SDK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/agora_native_sdk/sdk")

add_executable(${PROJECT_NAME} main.cpp)

set_target_properties(${PROJECT_NAME} PROPERTIES 
    CXX_STANDARD 17 
    CXX_STANDARD_REQUIRED YES
)


target_include_directories(${PROJECT_NAME} PRIVATE ${AGORA_SDK_PATH}/high_level_api/include)

target_link_libraries(${PROJECT_NAME} ${AGORA_SDK_PATH}/x86_64/agora_rtc_sdk.dll.lib)

main.cpp

#include <iostream>
#include "IAgoraRtcEngine.h"
#include "IAgoraMediaEngine.h"
using namespace agora::rtc;

class AgoraEventHandler : public IRtcEngineEventHandler {
public:
    void onJoinChannelSuccess(const char* channel, uid_t uid, int elapsed) override {
        std::cout << "Successfully joined channel: " << channel << ", UID: " << uid << std::endl;
    }

    void onUserJoined(uid_t uid, int elapsed) override {
        std::cout << "User joined: UID = " << uid << std::endl;
    }

    void onUserOffline(uid_t uid, USER_OFFLINE_REASON_TYPE reason) override {
        std::cout << "User offline: UID = " << uid << ", Reason = " << reason << std::endl;
    }

    void onError(int err, const char* msg) override {
        std::cerr << "Error: " << msg << " (code: " << err << ")" << std::endl;
    }
};

int main() {
}

Folder structure

image

Error

image

Please help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant