Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice

Help Wanted Failed to link my webrtc.lib to WebRTCPlugin

Discussion in 'Unity Render Streaming' started by cloudending, Nov 19, 2021.

  1. cloudending

    cloudending

    Joined:
    Mar 25, 2019
    Posts:
    15
    I follow the https://webrtc.github.io/webrtc-org/native-code/development/ to build my webrtc because I want to add some metadata to VideoFrame. But when I integrate webrtc.lib to WebRTCPlugin. It have build error:
    Code (CSharp):
    1. error LNK2019: unresolve refrence "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl rtc::IPAddress::ToString(void)const " (?ToString@IPAddress@rtc@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ),function "public: struct Candidate & __cdecl Candidate::operator=(class cricket::Candidate const &)" (??4Candidate@@QEAAAEAU0@AEBV0cricket@@@Z) is referenced
    2. 1>WebRTCPlugin.obj : error LNK2019: unresolve refrence "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl rtc::SocketAddress::ToString(void)const " (?ToString@SocketAddress@rtc@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ),function "public: struct Candidate & __cdecl Candidate::operator=(class cricket::Candidate const &)" (??4Candidate@@QEAAAEAU0@AEBV0cricket@@@Z) is referenced
    3.  
    It looks like my webrtc does not include some thirdparty? My webrtc source code checkouts out from branch-heads/4389 as mentioned in com.unity.webrtc readme.
    But branch-heads/4389 commit id is
    Code (CSharp):
    1. commit e7d9f74b256605556726c64dacd518a105ba872f (HEAD, branch-heads/4389)
    2. Author: Tomas Gunnarsson <tommi@webrtc.org>
    3. Date:   Wed Feb 24 22:22:56 2021 +0100
    4.  
    5.     [Merge M89] - Change the safe SCTP MTU size to 1191
    6.  
    7.     TBR=tommi@webrtc.org
    8.     (cherry picked from commit c50097798342271431bac0ee1abf0b5ce7d61dfb)
    9.  
    10.     Bug: webrtc:12495, chromium:1182634
    11.     Change-Id: Ie149391a5a9f61095cf3f31db141c9bbc8be8bee
    12.     Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208642
    13.     Reviewed-by: Taylor <deadbeef@webrtc.org>
    14.     Reviewed-by: Philipp Hancke <philipp.hancke@googlemail.com>
    15.     Commit-Queue: Tommi <tommi@webrtc.org>
    16.     Cr-Original-Commit-Position: refs/heads/master@{#33338}
    17.     Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211350
    18.     Reviewed-by: Tommi <tommi@webrtc.org>
    19.     Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
    20.     Cr-Commit-Position: refs/branch-heads/4389@{#7}
    21.     Cr-Branched-From: 7acc2d9fe3a6e3c4d8881d2bdfc9b8968a724cd5-refs/heads/master@{#32986}
    It is not the same as https://groups.google.com/g/discuss-webrtc/c/Zrsn2hi8FV0/m/KIbn0EZPBQAJ
    My build argument of webrtc is
    Code (CSharp):
    1. gn gen out/Debug --ide=vs2019 --args="is_debug=true target_cpu=\"x64\" enable_iterator_debugging=false"
    2. ninja -C out/Debug
    3.  
    Do I have someting wrong in build webrtc of myself.
     
    Last edited: Nov 19, 2021
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    418
    Have you read the README file?
    https://github.com/Unity-Technologies/com.unity.webrtc/blob/develop/Plugin~/README.md
     
  3. cloudending

    cloudending

    Joined:
    Mar 25, 2019
    Posts:
    15
    kazuki_unity729 likes this.
unityunity