microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.36k stars 6.45k forks source link

[libdatachannel] Link failure in global mode #40426

Closed tdarbinyan closed 3 months ago

tdarbinyan commented 3 months ago

Operating system

Windows 11

Compiler

MSVC (VS 2022)

Steps to reproduce the behavior

- ./vcpkg install libdatachannel:x86-windows
 - Write any piece of code using libdatachannel
 - Receive LNK2019

Failure logs

1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __thiscall rtc::IceServer::IceServer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0IceServer@rtc@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) в функции "public: static void __cdecl std::_Default_allocator_traits<class std::allocator<struct rtc::IceServer> >::construct<struct rtc::IceServer,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &>(class std::allocator<struct rtc::IceServer> &,struct rtc::IceServer * const,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (??$construct@UIceServer@rtc@@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@?$_Default_allocator_traits@V?$allocator@UIceServer@rtc@@@std@@@std@@SAXAAV?$allocator@UIceServer@rtc@@@1@QAUIceServer@rtc@@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z).

1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "__declspec(dllimport) public: __thiscall rtc::IceServer::~IceServer(void)" (__imp_??1IceServer@rtc@@QAE@XZ) в функции "public: void * __thiscall rtc::IceServer::`scalar deleting destructor'(unsigned int)" (??_GIceServer@rtc@@QAEPAXI@Z).

Additional context

I'm sorry in advance for logs in russian, but I hope the error codes will be enough to grasp what happens. Also I don't know if I filled the issue blank correctly, so feel free to correct me. So here is how it went

I tried recreating the example from libdatachannels github with x86-windows triplet, but received linkage errors as shown in the Failure logs.

Then yesterday I saw, that someone had a similar issue which was corrected in #40337 , so i removed vcpkg completely as vcpkg upgrade is not advised to use, and reinstalled it. All the other dependencies in my main project installed via vcpkg work perfectly fine, but the issue with libdatachannel persists.

I tried also using the static triplet x86-windows-static, set vcpkg use static libraries to Yes and changed /MDd to /MTd, and got a bit different kind of errors

1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: double __thiscall rtc::RtpPacketizationConfig::timestampToSeconds(unsigned int)" (?timestampToSeconds@RtpPacketizationConfig@rtc@@QAENI@Z) в функции "public: __thiscall `class std::shared_ptr<class Stream> __cdecl createStream(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)'::`2'::<lambda_1>::operator()(enum Stream::StreamSourceType,unsigned __int64,class std::vector<enum std::byte,class std::allocator<enum std::byte> >)const " (??R<lambda_1>@?1??createStream@@YA?AV?$shared_ptr@VStream@@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@I0@Z@QBE@W4StreamSourceType@Stream@@_KV?$vector@W4byte@std@@V?$allocator@W4byte@std@@@2@@3@@Z).
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: unsigned int __thiscall rtc::RtpPacketizationConfig::secondsToTimestamp(double)" (?secondsToTimestamp@RtpPacketizationConfig@rtc@@QAEIN@Z) в функции "public: __thiscall `class std::shared_ptr<class Stream> __cdecl createStream(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)'::`2'::<lambda_1>::operator()(enum Stream::StreamSourceType,unsigned __int64,class std::vector<enum std::byte,class std::allocator<enum std::byte> >)const " (??R<lambda_1>@?1??createStream@@YA?AV?$shared_ptr@VStream@@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@I0@Z@QBE@W4StreamSourceType@Stream@@_KV?$vector@W4byte@std@@V?$allocator@W4byte@std@@@2@@3@@Z).
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: __thiscall rtc::RtpPacketizer::RtpPacketizer(class std::shared_ptr<class rtc::RtpPacketizationConfig>)" (??0RtpPacketizer@rtc@@QAE@V?$shared_ptr@VRtpPacketizationConfig@rtc@@@std@@@Z) в функции "public: __thiscall rtc::AudioRtpPacketizer<48000>::AudioRtpPacketizer<48000>(class std::shared_ptr<class rtc::RtpPacketizationConfig>)" (??0?$AudioRtpPacketizer@$0LLIA@@rtc@@QAE@V?$shared_ptr@VRtpPacketizationConfig@rtc@@@std@@@Z).
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: virtual __thiscall rtc::RtpPacketizer::~RtpPacketizer(void)" (??1RtpPacketizer@rtc@@UAE@XZ) в функции "public: virtual __thiscall rtc::AudioRtpPacketizer<48000>::~AudioRtpPacketizer<48000>(void)" (??1?$AudioRtpPacketizer@$0LLIA@@rtc@@UAE@XZ).
1>main.obj : error LNK2001: неразрешенный внешний символ "public: virtual void __thiscall rtc::RtpPacketizer::media(class rtc::Description::Media const &)" (?media@RtpPacketizer@rtc@@UAEXABVMedia@Description@2@@Z).
1>main.obj : error LNK2001: неразрешенный внешний символ "public: virtual void __thiscall rtc::RtpPacketizer::outgoing(class std::vector<class std::shared_ptr<struct rtc::Message>,class std::allocator<class std::shared_ptr<struct rtc::Message> > > &,class std::function<void __cdecl(class std::shared_ptr<struct rtc::Message>)> const &)" (?outgoing@RtpPacketizer@rtc@@UAEXAAV?$vector@V?$shared_ptr@UMessage@rtc@@@std@@V?$allocator@V?$shared_ptr@UMessage@rtc@@@std@@@2@@std@@ABV?$function@$$A6AXV?$shared_ptr@UMessage@rtc@@@std@@@Z@4@@Z).
1>main.obj : error LNK2001: неразрешенный внешний символ "protected: virtual class std::shared_ptr<struct rtc::Message> __thiscall rtc::RtpPacketizer::packetize(class std::shared_ptr<class std::vector<enum std::byte,class std::allocator<enum std::byte> > >,bool)" (?packetize@RtpPacketizer@rtc@@MAE?AV?$shared_ptr@UMessage@rtc@@@std@@V?$shared_ptr@V?$vector@W4byte@std@@V?$allocator@W4byte@std@@@2@@std@@@4@_N@Z).
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: __thiscall rtc::H264RtpPacketizer::H264RtpPacketizer(enum rtc::NalUnit::Separator,class std::shared_ptr<class rtc::RtpPacketizationConfig>,unsigned short)" (??0H264RtpPacketizer@rtc@@QAE@W4Separator@NalUnit@1@V?$shared_ptr@VRtpPacketizationConfig@rtc@@@std@@G@Z) в функции "void __cdecl std::_Construct_in_place<class rtc::H264RtpPacketizer,enum rtc::NalUnit::Separator,class std::shared_ptr<class rtc::RtpPacketizationConfig> &>(class rtc::H264RtpPacketizer &,enum rtc::NalUnit::Separator &&,class std::shared_ptr<class rtc::RtpPacketizationConfig> &)" (??$_Construct_in_place@VH264RtpPacketizer@rtc@@W4Separator@NalUnit@2@AAV?$shared_ptr@VRtpPacketizationConfig@rtc@@@std@@@std@@YAXAAVH264RtpPacketizer@rtc@@$$QAW4Separator@NalUnit@2@AAV?$shared_ptr@VRtpPacketizationConfig@rtc@@@0@@Z).
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: __thiscall rtc::RtcpNackResponder::RtcpNackResponder(unsigned int)" (??0RtcpNackResponder@rtc@@QAE@I@Z) в функции "void __cdecl std::_Construct_in_place<class rtc::RtcpNackResponder>(class rtc::RtcpNackResponder &)" (??$_Construct_in_place@VRtcpNackResponder@rtc@@$$V@std@@YAXAAVRtcpNackResponder@rtc@@@Z).
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: __thiscall rtc::RtcpSrReporter::RtcpSrReporter(class std::shared_ptr<class rtc::RtpPacketizationConfig>)" (??0RtcpSrReporter@rtc@@QAE@V?$shared_ptr@VRtpPacketizationConfig@rtc@@@std@@@Z) в функции "void __cdecl std::_Construct_in_place<class rtc::RtcpSrReporter,class std::shared_ptr<class rtc::RtpPacketizationConfig> &>(class rtc::RtcpSrReporter &,class std::shared_ptr<class rtc::RtpPacketizationConfig> &)" (??$_Construct_in_place@VRtcpSrReporter@rtc@@AAV?$shared_ptr@VRtpPacketizationConfig@rtc@@@std@@@std@@YAXAAVRtcpSrReporter@rtc@@AAV?$shared_ptr@VRtpPacketizationConfig@rtc@@@0@@Z).
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: unsigned int __thiscall rtc::RtcpSrReporter::lastReportedTimestamp(void)const " (?lastReportedTimestamp@RtcpSrReporter@rtc@@QBEIXZ) в функции "public: __thiscall `class std::shared_ptr<class Stream> __cdecl createStream(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)'::`2'::<lambda_1>::operator()(enum Stream::StreamSourceType,unsigned __int64,class std::vector<enum std::byte,class std::allocator<enum std::byte> >)const " (??R<lambda_1>@?1??createStream@@YA?AV?$shared_ptr@VStream@@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@I0@Z@QBE@W4StreamSourceType@Stream@@_KV?$vector@W4byte@std@@V?$allocator@W4byte@std@@@2@@3@@Z).
1>main.obj : error LNK2019: ссылка на неразрешенный внешний символ "public: void __thiscall rtc::RtcpSrReporter::setNeedsToReport(void)" (?setNeedsToReport@RtcpSrReporter@rtc@@QAEXXZ) в функции "public: __thiscall `class std::shared_ptr<class Stream> __cdecl createStream(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)'::`2'::<lambda_1>::operator()(enum Stream::StreamSourceType,unsigned __int64,class std::vector<enum std::byte,class std::allocator<enum std::byte> >)const " (??R<lambda_1>@?1??createStream@@YA?AV?$shared_ptr@VStream@@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@I0@Z@QBE@W4StreamSourceType@Stream@@_KV?$vector@W4byte@std@@V?$allocator@W4byte@std@@@2@@3@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_create в функции "public: __thiscall rtc::impl::IceTransport::IceTransport(struct rtc::Configuration const &,class std::function<void __cdecl(class rtc::Candidate const &)>,class std::function<void __cdecl(enum rtc::impl::Transport::State)>,class std::function<void __cdecl(enum rtc::impl::IceTransport::GatheringState)>)" (??0IceTransport@impl@rtc@@QAE@ABUConfiguration@2@V?$function@$$A6AXABVCandidate@rtc@@@Z@std@@V?$function@$$A6AXW4State@Transport@impl@rtc@@@Z@5@V?$function@$$A6AXW4GatheringState@IceTransport@impl@rtc@@@Z@5@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_destroy в функции "public: __thiscall rtc::impl::IceTransport::IceTransport(struct rtc::Configuration const &,class std::function<void __cdecl(class rtc::Candidate const &)>,class std::function<void __cdecl(enum rtc::impl::Transport::State)>,class std::function<void __cdecl(enum rtc::impl::IceTransport::GatheringState)>)" (??0IceTransport@impl@rtc@@QAE@ABUConfiguration@2@V?$function@$$A6AXABVCandidate@rtc@@@Z@std@@V?$function@$$A6AXW4State@Transport@impl@rtc@@@Z@5@V?$function@$$A6AXW4GatheringState@IceTransport@impl@rtc@@@Z@5@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_gather_candidates в функции "public: void __thiscall rtc::impl::IceTransport::gatherLocalCandidates(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::vector<struct rtc::IceServer,class std::allocator<struct rtc::IceServer> >)" (?gatherLocalCandidates@IceTransport@impl@rtc@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$vector@UIceServer@rtc@@V?$allocator@UIceServer@rtc@@@std@@@5@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_get_local_description в функции "public: class rtc::Description __thiscall rtc::impl::IceTransport::getLocalDescription(enum rtc::Description::Type)const " (?getLocalDescription@IceTransport@impl@rtc@@QBE?AVDescription@3@W4Type@43@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_set_remote_description в функции "public: void __thiscall rtc::impl::IceTransport::setRemoteDescription(class rtc::Description const &)" (?setRemoteDescription@IceTransport@impl@rtc@@QAEXABVDescription@3@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_add_remote_candidate в функции "public: bool __thiscall rtc::impl::IceTransport::addRemoteCandidate(class rtc::Candidate const &)" (?addRemoteCandidate@IceTransport@impl@rtc@@QAE_NABVCandidate@3@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_add_turn_server в функции "private: void __thiscall rtc::impl::IceTransport::addIceServer(struct rtc::IceServer)" (?addIceServer@IceTransport@impl@rtc@@AAEXUIceServer@3@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_send_diffserv в функции "private: virtual bool __thiscall rtc::impl::IceTransport::outgoing(class std::shared_ptr<struct rtc::Message>)" (?outgoing@IceTransport@impl@rtc@@EAE_NV?$shared_ptr@UMessage@rtc@@@std@@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_get_selected_candidates в функции "public: bool __thiscall rtc::impl::IceTransport::getSelectedCandidatePair(class rtc::Candidate *,class rtc::Candidate *)" (?getSelectedCandidatePair@IceTransport@impl@rtc@@QAE_NPAVCandidate@3@0@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_get_selected_addresses в функции "public: class std::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > __thiscall rtc::impl::IceTransport::getLocalAddress(void)const " (?getLocalAddress@IceTransport@impl@rtc@@QBE?AV?$optional@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@XZ).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_set_log_level в функции "public: __thiscall rtc::impl::IceTransport::IceTransport(struct rtc::Configuration const &,class std::function<void __cdecl(class rtc::Candidate const &)>,class std::function<void __cdecl(enum rtc::impl::Transport::State)>,class std::function<void __cdecl(enum rtc::impl::IceTransport::GatheringState)>)" (??0IceTransport@impl@rtc@@QAE@ABUConfiguration@2@V?$function@$$A6AXABVCandidate@rtc@@@Z@std@@V?$function@$$A6AXW4State@Transport@impl@rtc@@@Z@5@V?$function@$$A6AXW4GatheringState@IceTransport@impl@rtc@@@Z@5@@Z).
1>datachannel-static.lib(icetransport.cpp.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__juice_set_log_handler в функции "public: __thiscall rtc::impl::IceTransport::IceTransport(struct rtc::Configuration const &,class std::function<void __cdecl(class rtc::Candidate const &)>,class std::function<void __cdecl(enum rtc::impl::Transport::State)>,class std::function<void __cdecl(enum rtc::impl::IceTransport::GatheringState)>)" (??0IceTransport@impl@rtc@@QAE@ABUConfiguration@2@V?$function@$$A6AXABVCandidate@rtc@@@Z@std@@V?$function@$$A6AXW4State@Transport@impl@rtc@@@Z@5@V?$function@$$A6AXW4GatheringState@IceTransport@impl@rtc@@@Z@5@@Z).
1>libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__CertOpenStore@20 в функции _capi_open_store.
1>libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__CertCloseStore@8 в функции _capi_find_key.
1>libcrypto.lib(libdefault-lib-winstore_store.obj) : error LNK2001: неразрешенный внешний символ __imp__CertCloseStore@8.
1>libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__CertEnumCertificatesInStore@8 в функции _capi_find_cert.
1>libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__CertFindCertificateInStore@24 в функции _capi_find_cert.
1>libcrypto.lib(libdefault-lib-winstore_store.obj) : error LNK2001: неразрешенный внешний символ __imp__CertFindCertificateInStore@24.
1>libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__CertDuplicateCertificateContext@4 в функции _capi_load_ssl_client_cert.
1>libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__CertFreeCertificateContext@4 в функции _capi_find_key.
1>libcrypto.lib(libdefault-lib-winstore_store.obj) : error LNK2001: неразрешенный внешний символ __imp__CertFreeCertificateContext@4.
1>libcrypto.lib(libcrypto-lib-e_capi.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__CertGetCertificateContextProperty@16 в функции _capi_cert_get_fname.
1>libcrypto.lib(libdefault-lib-winstore_store.obj) : error LNK2019: ссылка на неразрешенный внешний символ __imp__CertOpenSystemStoreW@8 в функции _winstore_open.
1>D:\Programming\WebRTC\Debug\WebRTC.exe : fatal error LNK1120: неразрешенных внешних элементов: 33

Notes: I'm using vcpkg in global mode, also some of the errors are deleted from Failure log because it was too long

Help would be very appreciated, as I lack understanding of why this happens and am stuck for more than a week

dg0yt commented 3 months ago

Can you verify that you actually install/use version 0.21.2 of the port?

It seems that they don't define RTC_EXPORTS when building the dynamic lib, but I would need to check that.

Unfortunately the examples can't be built standalone without patching, otherwise I might have added a test port with https://github.com/microsoft/vcpkg/pull/40337. The streamer examples looks like a good candidate.

tdarbinyan commented 3 months ago

Yes, it's the version 0.21.2. When reinstalling I cleared the archive so it's most certainly the latest version

dg0yt commented 3 months ago

Do you know if the version before worked? (Don't spend extra time, it is just personal interest after authoring the last port update.)

tdarbinyan commented 3 months ago

Before the update example was not working, unfortunately i didn't save the error log, but it was all LNK2019 of rtc:: elements and no other errors.

But aside from the example, I tried to write some minimal code in a new project (just declaring a variable of type rtc::Configuration and modifying it). What's interesting, it worked before but doesn't now

dg0yt commented 3 months ago

40439 shows that the port is okay, at least when used via CMake. The only quirk was the need to add a WIN32_LEAN_AND_MEAN definition.

tdarbinyan commented 3 months ago

Sorry, I forgot to mention, that I already added it before every #include <windows.h>, also linked against ws2_32.lib for winsock. I will try to reinstall everything and try once more

dg0yt commented 3 months ago

Oops, I see another RTC_STATIC now.

tdarbinyan commented 3 months ago

Hello! When can I test the updated port? Is the problem diagnosed and is it close to the solution? Sorry if the question is rude, but I have a deadline set. I appreciate your help very much✨

dg0yt commented 3 months ago

https://github.com/microsoft/vcpkg/pull/40439. Reminds me of the second RTC_STATIC.

dg0yt commented 3 months ago

Reminds me of the second RTC_STATIC.

Already fixed. Just waiting for feedback.

tdarbinyan commented 3 months ago

I cloned the pr on the fresh github clone of vcpkg, installed libdatachannel, but the issue persisted. But I noticed something. In CMakeLists.txt of the example there is this piece of code

if(MSVC)
    add_custom_command(TARGET streamer POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy_if_different
        "$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
        $<TARGET_FILE_DIR:streamer>
    )
endif()

but the is no datachannel.dll anywhere to be found in my vcpkg folder. I tried to copy it from cmake build of the exact libdatachannel repository to vcpkg\installed\x86-windows\bin, but sadly it didn't help. Where should I paste the datachannel.dll file to test if it's the reason of failure?

dg0yt commented 3 months ago

I cloned the pr on the fresh github clone of vcpkg, installed libdatachannel, but the issue persisted.

The original link issue?

But I noticed something. In CMakeLists.txt of the example there is this piece of code ...

This is for copying a runtime lib. That's not for the link issue but for runtime. vcpkg has another way for appl-local deployment, but with the link error, you don't get to POST_BUILD.

the is no datachannel.dll anywhere to be found in my vcpkg folder.

Hm, vcpkg CI also doesn't have DLLs... I have to take second look.

dg0yt commented 3 months ago

the is no datachannel.dll anywhere to be found in my vcpkg folder.

Hm, vcpkg CI also doesn't have DLLs... I have to take second look.

Found it :facepalm: PR updated.

tdarbinyan commented 3 months ago

I applied your latest change and my minimal code from here

But aside from the example, I tried to write some minimal code in a new project (just declaring a variable of type rtc::Configuration and modifying it). What's interesting, it worked before but doesn't now

started working again. What comes to the streamer example, there are now only LINK2019 errors with element, that are inside #ifdef RTC_ENABLE_MEDIA(which is already a great success). I tried to manually fix that in ports/libdatachannel/portfile.cmake by adding

file(GLOB_RECURSE ALL_RTC_FILES "${CURRENT_PACKAGES_DIR}/include/rtc/*")
foreach(FILE_PATH ${ALL_RTC_FILES})
    vcpkg_replace_string("${FILE_PATH}" "#ifdef RTC_ENABLE_MEDIA" "#if 1")
endforeach()

but sadly without results(

dg0yt commented 3 months ago

If you want the media stuff, you must install libdatachannel[srtp].

tdarbinyan commented 3 months ago

Yup, vcpkg install libdatachannel[srtp]:x86-windows --recurse solved all the problems, I am closing the issue now. Thank you very much!!