versatica / libmediasoupclient

mediasoup client side C++ library
https://mediasoup.org
ISC License
288 stars 178 forks source link

simple demo on win10 with link issue #150

Closed evehal closed 1 year ago

evehal commented 1 year ago

#define WEBRTC_WIN
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN

#include "mediasoupclient.hpp"
#include <string>

#pragma comment(lib,"mediasoupclient.lib")
int main(int argc, char* argv[]) {
    mediasoupclient::Logger::LogLevel logLevel{ mediasoupclient::Logger::LogLevel::LOG_DEBUG };
    std::string logLevelStr;
    std::string webrtcLogLevelStr;

    mediasoupclient::Logger::SetLogLevel(logLevel);
    mediasoupclient::Logger::SetHandler(new mediasoupclient::Logger::DefaultLogHandler());
    mediasoupclient::Initialize();
    mediasoupclient::Cleanup();
    return 1;
}

1>------ Build started: Project: MediaSoupProject1, Configuration: Debug x64 ------ 1>main.cpp 1>G:\m94build\include\media\base\codec.h(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss 1>mediasoupclient.lib(mediasoupclient.obj) : error LNK2019: unresolved external symbol "int64 cdecl rtc::TimeMillis(void)" (?TimeMillis@rtc@@YA_JXZ) referenced in function "int64 cdecl rtc::Time(void)" (?Time@rtc@@YA_JXZ) 1>mediasoupclient.lib(mediasoupclient.obj) : error LNK2019: unresolved external symbol "bool cdecl rtc::InitRandom(int)" (?InitRandom@rtc@@YA_NH@Z) referenced in function "void cdecl mediasoupclient::Initialize(void)" (?Initialize@mediasoupclient@@YAXXZ) 1>mediasoupclient.lib(mediasoupclient.obj) : error LNK2019: unresolved external symbol "bool cdecl rtc::InitializeSSL(void)" (?InitializeSSL@rtc@@YA_NXZ) referenced in function "void cdecl mediasoupclient::Initialize(void)" (?Initialize@mediasoupclient@@YAXXZ) 1>mediasoupclient.lib(mediasoupclient.obj) : error LNK2019: unresolved external symbol "bool __cdecl rtc::CleanupSSL(void)" (?CleanupSSL@rtc@@YA_NXZ) referenced in function "void cdecl mediasoupclient::Cleanup(void)" (?Cleanup@mediasoupclient@@YAXXZ) 1>mediasoupclient.lib(mediasoupclient.obj) : error LNK2019: unresolved external symbol "void cdecl webrtc::field_trial::InitFieldTrialsFromString(char const *)" (?InitFieldTrialsFromString@field_trial@webrtc@@YAXPEBD@Z) referenced in function "void __cdecl mediasoupclient::Initialize(void)" (?Initialize@mediasoupclient@@YAXXZ) 1>G:\CPP_Projects\MediaSoupProject1\x64\Debug\MediaSoupProject1.exe : fatal error LNK1120: 5 unresolved externals 1>Done building project "MediaSoupProject1.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

i use webrtc m94 from https://github.com/crow-misia/libwebrtc-bin/releases any idea?

ibc commented 1 year ago

I'm afraid it's not possible to help much here. No idea if the problem is due the way you build the app. Please ask in the mediasoup forum.