ncnn win10 vs2017编译protobuf老是报错

rm5edbpk  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(39)

detail | 详细描述 | 詳細な説明

[100%] Linking CXX executable protoc.exe
LINK: command "C:\PROGRA2\MIB0551\2017\COMMUN1\VC\Tools\MSVC\14161.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.

6za6bjd0

6za6bjd01#

vs2017环境命令把网上的都试了,也不行,cmake是最新的版本,protobuf从这里下载的3.4.0

ykejflvf

ykejflvf2#

issue 里有一些关于 0x2 报错的记录,可以参考,例如 #2498

相关问题