I have a windows visual studio demo application use webrtc. I used to build webrtc by gyp and link built static libraries with the demo application.
I switch to gn build recently since gyp build is depreciated. I found gn build create much less static libraries and I met a lot of link issue in my demo application.
Error LNK2019 unresolved external symbol "public: virtual class cricket::VideoCapturer * __cdecl cricket::WebRtcVideoDeviceCapturerFactory::Create(struct cricket::Device const &)" (?Create@WebRtcVideoDeviceCapturerFactory@cricket@@UEAAPEAVVideoCapturer@2@AEBUDevice@2@@Z) referenced in function "protected: class cricket::VideoCapturer * __cdecl Conductor::OpenVideoCaptureDevice(void)" (?OpenVideoCaptureDevice@Conductor@@IEAAPEAVVideoCapturer@cricket@@XZ) SimplePeerConnection C:\mywork\unityplugin\VisualStudioDemo\SimplePeerConnection\SimplePeerConnection.obj 1
Error LNK2019 unresolved external symbol "public: static class webrtc::VideoCaptureModule::DeviceInfo * __cdecl webrtc::VideoCaptureFactory::CreateDeviceInfo(int)" (?CreateDeviceInfo@VideoCaptureFactory@webrtc@@SAPEAVDeviceInfo@VideoCaptureModule@2@H@Z) referenced in function "protected: class cricket::VideoCapturer * __cdecl Conductor::OpenVideoCaptureDevice(void)" (?OpenVideoCaptureDevice@Conductor@@IEAAPEAVVideoCapturer@cricket@@XZ) SimplePeerConnection C:\mywork\unityplugin\VisualStudioDemo\SimplePeerConnection\SimplePeerConnection.obj 1
Error LNK2001 unresolved external symbol "public: static char const * const webrtc::MediaConstraintsInterface::kOfferToReceiveVideo" (?kOfferToReceiveVideo@MediaConstraintsInterface@webrtc@@2QBDB) SimplePeerConnection C:\mywork\unityplugin\VisualStudioDemo\SimplePeerConnection\SimplePeerConnection.obj 1
Error LNK2001 unresolved external symbol "public: static char const * const webrtc::MediaConstraintsInterface::kOfferToReceiveAudio" (?kOfferToReceiveAudio@MediaConstraintsInterface@webrtc@@2QBDB) SimplePeerConnection C:\mywork\unityplugin\VisualStudioDemo\SimplePeerConnection\SimplePeerConnection.obj 1
Error LNK2001 unresolved external symbol "public: static char const * const webrtc::MediaConstraintsInterface::kEnableDtlsSrtp" (?kEnableDtlsSrtp@MediaConstraintsInterface@webrtc@@2QBDB) SimplePeerConnection C:\mywork\unityplugin\VisualStudioDemo\SimplePeerConnection\SimplePeerConnection.obj 1
Error LNK2019 unresolved external symbol "public: bool __cdecl webrtc::MediaConstraintsInterface::Constraints::FindFirst(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?FindFirst@Constraints@MediaConstraintsInterface@webrtc@@QEBA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAV45@@Z) referenced in function "public: void __cdecl webrtc::FakeConstraints::SetMandatory<bool>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool const &)" (??$SetMandatory@_N@FakeConstraints@webrtc@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEB_N@Z) SimplePeerConnection C:\mywork\unityplugin\VisualStudioDemo\SimplePeerConnection\SimplePeerConnection.obj 1
Error LNK2019 unresolved external symbol "class webrtc::SessionDescriptionInterface * __cdecl webrtc::CreateSessionDescription(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct webrtc::SdpParseError *)" (?CreateSessionDescription@webrtc@@YAPEAVSessionDescriptionInterface@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0PEAUSdpParseError@1@@Z) referenced in function "public: bool __cdecl Conductor::ReceivedSdp(char const *)" (?ReceivedSdp@Conductor@@QEAA_NPEBD@Z) SimplePeerConnection C:\mywork\unityplugin\VisualStudioDemo\SimplePeerConnection\SimplePeerConnection.obj 1
Error LNK2019 unresolved external symbol "class webrtc::IceCandidateInterface * __cdecl webrtc::CreateIceCandidate(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct webrtc::SdpParseError *)" (?CreateIceCandidate@webrtc@@YAPEAVIceCandidateInterface@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H0PEAUSdpParseError@1@@Z) referenced in function "public: bool __cdecl Conductor::ReceivedIceCandidate(char const *)" (?ReceivedIceCandidate@Conductor@@QEAA_NPEBD@Z) SimplePeerConnection C:\mywork\unityplugin\VisualStudioDemo\SimplePeerConnection\SimplePeerConnection.obj 1
Error LNK2019 unresolved external symbol "class rtc::scoped_refptr<class webrtc::PeerConnectionFactoryInterface> __cdecl webrtc::CreatePeerConnectionFactory(class rtc::Thread *,class rtc::Thread *,class rtc::Thread *,class webrtc::AudioDeviceModule *,class cricket::WebRtcVideoEncoderFactory *,class cricket::WebRtcVideoDecoderFactory *,class webrtc::AudioSpatializationInterface *)" (?CreatePeerConnectionFactory@webrtc@@YA?AV?$scoped_refptr@VPeerConnectionFactoryInterface@webrtc@@@rtc@@PEAVThread@3@00PEAVAudioDeviceModule@1@PEAVWebRtcVideoEncoderFactory@cricket@@PEAVWebRtcVideoDecoderFactory@7@PEAVAudioSpatializationInterface@1@@Z) referenced in function "public: bool __cdecl Conductor::InitializePeerConnection(bool)" (?InitializePeerConnection@Conductor@@QEAA_N_N@Z)