Open wwzh2015 opened 2 years ago
[100%] Linking CXX executable protoc.exe LINK: command "C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\protoc.dir\objects1.rsp /out:protoc.exe /implib:protoc.lib /pdb:G:\protobuf-3.4.0\build\protoc.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console libprotobuf.lib libprotoc.lib libprotobuf.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:protoc.exe.manifest" failed (exit code 1120) with the following output: libprotoc.lib(js_generator.cc.obj) : error LNK2019: 无法解析的外部符号 "struct FileToc well_known_types_js" (?well_known_types_js@@3PAUFileToc@@A),该符号在函数 "private: void __cdecl google::protobuf::compiler::js::Generator::GenerateFile(struct google::protobuf::compiler::js::GeneratorOptions const &,class google::protobuf::io::Printer ,class google::protobuf::FileDescriptor const *)const " (?GenerateFile@Generator@js@compiler@protobuf@google@@AEBAXAEBUGeneratorOptions@2345@PEAVPrinter@io@45@PEBVFileDescriptor@45@@Z) 中被引用 protoc.exe : fatal error LNK1120: 1 个无法解析的外部命令 NMAKE : fatal error U1077: “"C:\Program Files\CMake\bin\cmake.exe"”: 返回代码“0xffffffff” Stop. NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"”: 返回代码“0x2” Stop. NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"”: 返回代码“0x2” Stop.
vs2017环境命令把网上的都试了,也不行,cmake是最新的版本,protobuf从这里下载的3.4.0
issue 里有一些关于 0x2 报错的记录,可以参考,例如 https://github.com/Tencent/ncnn/issues/2498
detail | 详细描述 | 詳細な説明
[100%] Linking CXX executable protoc.exe LINK: command "C:\PROGRA~2\MIB055~1\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\protoc.dir\objects1.rsp /out:protoc.exe /implib:protoc.lib /pdb:G:\protobuf-3.4.0\build\protoc.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console libprotobuf.lib libprotoc.lib libprotobuf.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:protoc.exe.manifest" failed (exit code 1120) with the following output: libprotoc.lib(js_generator.cc.obj) : error LNK2019: 无法解析的外部符号 "struct FileToc well_known_types_js" (?well_known_types_js@@3PAUFileToc@@A),该符号在函数 "private: void __cdecl google::protobuf::compiler::js::Generator::GenerateFile(struct google::protobuf::compiler::js::GeneratorOptions const &,class google::protobuf::io::Printer ,class google::protobuf::FileDescriptor const *)const " (?GenerateFile@Generator@js@compiler@protobuf@google@@AEBAXAEBUGeneratorOptions@2345@PEAVPrinter@io@45@PEBVFileDescriptor@45@@Z) 中被引用 protoc.exe : fatal error LNK1120: 1 个无法解析的外部命令 NMAKE : fatal error U1077: “"C:\Program Files\CMake\bin\cmake.exe"”: 返回代码“0xffffffff” Stop. NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"”: 返回代码“0x2” Stop. NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"”: 返回代码“0x2” Stop.