1

我需要 dll 文件作为 Windows 机器的输出。默认 GN 配置仅创建 lib 文件。所以我将 webrtc.gni 中的 target_type 从 static_library 更改为 loadable_module,但 Ninja 无法构建它。这是错误快照

ninja: Entering directory `out\Release12'
[626/3359] LINK_MODULE(DLL) webrtc_common.dll webrtc_common.dll.pdb
FAILED: webrtc_common.dll webrtc_common.dll.pdb
C:/webRTC/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /DLL /OUT:./webrtc_common.dll /PDB:./webrtc_common.dll.pdb @./webrtc_common.dll.rsp
common_types.obj : error LNK2019: unresolved external symbol "public: __cdecl rtc::FatalMessage::FatalMessage(char const *,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (??0FatalMessage@rtc@@QEAA@PEBDHPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: unsigned int __cdecl webrtc::BitrateAllocation::GetBitrate(unsigned __int64,unsigned __int64)const " (?GetBitrate@BitrateAllocation@webrtc@@QEBAI_K0@Z)
common_types.obj : error LNK2019: unresolved external symbol "public: __cdecl rtc::FatalMessage::~FatalMessage(void)" (??1FatalMessage@rtc@@QEAA@XZ) referenced in function "public: unsigned int __cdecl webrtc::BitrateAllocation::GetBitrate(unsigned __int64,unsigned __int64)const " (?GetBitrate@BitrateAllocation@webrtc@@QEBAI_K0@Z)
./webrtc_common.dll : fatal error LNK1120: 2 unresolved externals
[631/3359] CC obj/third_party/yasm/yasm/nasm-pp.obj
ninja: build stopped: subcommand failed.

谢谢,沙希

4

0 回答 0