Protobuf: Failed to build on Windows: definition of dllimport function not allowed

Created on 27 May 2020  路  13Comments  路  Source: protocolbuffers/protobuf

What version of protobuf and what language are you using?
Version: v3.12.2 (latest release tag)
Language: C++

What operating system (Linux, Windows, ...) and version?

Win

What runtime / compiler are you using (e.g., python version or gcc version)

VS2019

What did you do?

CMake+Ninja.

cmake                                                                   `
    -DBUILD_SHARED_LIBS=ON                                              `
    -DCMAKE_BUILD_TYPE=Release                                          `
    -DCMAKE_C_FLAGS="/GL /MP /Zi /arch:AVX2"                            `
    -DCMAKE_CXX_FLAGS="/EHsc /GL /MP /Zi /arch:AVX2"                    `
    -DCMAKE_EXE_LINKER_FLAGS="/DEBUG:FASTLINK /LTCG:incremental"        `
    -DCMAKE_INSTALL_PREFIX="${Env:ProgramFiles}/protobuf"               `
    -DCMAKE_PDB_OUTPUT_DIRECTORY="${PWD}/pdb"                           `
    -DCMAKE_SHARED_LINKER_FLAGS="/DEBUG:FASTLINK /LTCG:incremental"     `
    -DCMAKE_STATIC_LINKER_FLAGS="/LTCG:incremental"                     `
    -Dprotobuf_BUILD_EXAMPLES=ON                                        `
    -Dprotobuf_BUILD_SHARED_LIBS=ON                                     `
    -Dprotobuf_INSTALL_EXAMPLES=ON                                      `
    -G"Ninja"                                                           `
    ../cmake

Build script:
https://github.com/xkszltl/Roaster/blob/a66b24f36fb91d1aeeb62628e8ae5b0b61468f6f/win/pkgs/protobuf.ps1#L29-L57

What did you see instead?

This should be a recent regression.

[1/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\code_generator.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/code_generator.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\code_generator.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\code_generator.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[2/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_enum_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_enum_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_enum_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[3/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_primitive_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_primitive_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_primitive_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[4/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_extension.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_extension.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_extension.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[5/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_enum.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_enum.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_enum.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[6/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_padding_optimizer.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_padding_optimizer.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_padding_optimizer.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[7/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_message_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_message_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_message_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[8/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_message_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_message_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_message_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[9/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_string_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_string_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_string_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[10/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[11/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_enum_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_enum_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_enum_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[12/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_generator.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_generator.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_generator.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[13/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_source_generator_base.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_source_generator_base.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_source_generator_base.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[14/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_wrapper_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_wrapper_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_wrapper_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[15/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_service.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_service.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_service.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[16/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_primitive_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_primitive_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_repeated_primitive_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[17/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_map_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_map_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_map_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[18/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_enum.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_enum.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_enum.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[19/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_map_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_map_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_map_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[20/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_primitive_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_primitive_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_primitive_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[21/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_message.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_message.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_message.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[22/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_generator.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_generator.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_generator.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[23/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_extension_lite.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_extension_lite.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_extension_lite.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[24/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_helpers.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_helpers.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_helpers.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[25/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_reflection_class.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_reflection_class.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_reflection_class.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[26/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/java/java_enum.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[27/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_enum_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_enum_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_enum_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[28/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_file.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_file.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_file.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[29/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_field_lite.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_field_lite.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_field_lite.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[30/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_context.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/java/java_context.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_context.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_context.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[31/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_message_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_message_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_message_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[32/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_lite.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_lite.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_lite.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[33/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_helpers.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_helpers.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_helpers.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[34/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_field_base.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_field_base.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\csharp\csharp_field_base.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[35/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_field.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_field.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_enum_field.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[36/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_extension.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/java/java_extension.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_extension.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\java\java_extension.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[37/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_message.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_message.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\cpp\cpp_message.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
[38/278] Building CXX object CMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\command_line_interface.cc.obj
FAILED: CMakeFiles/libprotoc.dir/C_/Users/tolia/AppData/Local/Temp/2/protobuf/src/google/protobuf/compiler/command_line_interface.cc.obj
"C:\PROGRA~2\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x64\cl.exe"  /nologo /TP -DGOOGLE_PROTOBUF_CMAKE_BUILD -DHAVE_ZLIB -DLIBPROTOC_EXPORTS -DPROTOBUF_USE_DLLS -Dlibprotoc_EXPORTS -I. -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\src -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googletest\include -IC:\Users\tolia\AppData\Local\Temp\2\protobuf\third_party\googletest\googlemock\include -I"C:\Program Files\zlib\include" /EHsc /GL /MP /Zi /arch:AVX2 /MD /O2 /Ob2 /DNDEBUG   /MP /wd4018 /wd4065 /wd4146 /wd4244 /wd4251 /wd4267 /wd4305 /wd4307 /wd4309 /wd4334 /wd4355 /wd4506 /wd4800 /wd4996 /bigobj /showIncludes /FoCMakeFiles\libprotoc.dir\C_\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\command_line_interface.cc.obj /FdCMakeFiles\libprotoc.dir\ /FS -c C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google\protobuf\compiler\command_line_interface.cc
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
C:\Users\tolia\AppData\Local\Temp\2\protobuf\src\google/protobuf/parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed
c++

Most helpful comment

This can be solved by not exporting the method definitions for PackedEnumParser and PackedEnumParserArg in src/google/protobuf/parse_context.h.
Removing the PROTOBUF_EXPORT_TEMPLATE_DEFINE attribute in lines 747 and 763 makes them build fine as shared libraries.

Here is a patch:

Index: src/google/protobuf/parse_context.h
===================================================================
--- src/google/protobuf/parse_context.h
+++ src/google/protobuf/parse_context.h
@@ -744,7 +744,7 @@
     void* object, const char* ptr, ParseContext* ctx);

 template <typename T>
-PROTOBUF_EXPORT_TEMPLATE_DEFINE
+// PROTOBUF_EXPORT_TEMPLATE_DEFINE do not export definition
 PROTOBUF_MUST_USE_RESULT const
     char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx,
                            bool (*is_valid)(int), InternalMetadata* metadata,
@@ -760,7 +760,7 @@
 }

 template <typename T>
-PROTOBUF_EXPORT_TEMPLATE_DEFINE
+// PROTOBUF_EXPORT_TEMPLATE_DEFINE do not export definition
 PROTOBUF_MUST_USE_RESULT const
     char* PackedEnumParserArg(void* object, const char* ptr, ParseContext* ctx,
                               bool (*is_valid)(const void*, int),

Tested on all these platforms:

  • Ubuntu:

    • 16.04 - GCC5

    • 18.04 - GCC7

  • Windows 10:

    • Visual Studio 2015

    • Visual Studio 2017

    • Visual Studio 2019

  • macOS:

    • Mojave - Apple LLVM version 10.0.1 (clang-1001.0.46.4)

    • Catalina - Apple clang version 11.0.3 (clang-1103.0.32.62)

All 13 comments

FYI 3.11.4 is working.

After add target_compile_options(libprotoc PRIVATE -DLIBPROTOBUF_EXPORTS) to _libprotoc.cmake_, I received many link errors:

subprocess.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
zip_writer.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
plugin.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
plugin.pb.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
python_generator.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
ruby_generator.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_message_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_oneof.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_primitive_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
php_generator.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_generator.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_helpers.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_map_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_message.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_enum_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_extension.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_file.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_string_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_string_field_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
js_generator.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
objectivec_enum.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_primitive_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_primitive_field_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_service.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_shared_code_generator.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_message_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_message_field_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_message_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_name_resolver.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_map_field_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_message.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_message_builder.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_message_builder_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_generator.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_generator_factory.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_helpers.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_map_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_extension.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_extension_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_file.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_enum.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_enum_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_enum_field_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_enum_lite.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_repeated_primitive_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_source_generator_base.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_wrapper_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
java_context.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_primitive_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_reflection_class.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_repeated_enum_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_repeated_message_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_helpers.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_map_field.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
csharp_message.cc.obj : error LNK2001: unresolved external symbol "private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_" (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA)
...
libprotocd.dll : fatal error LNK1120: 65 unresolved externals
ninja: build stopped: subcommand failed.

same problem. how to solve?

I can confirm that neither versions v3.12.2 nor v3.12.3 work with vc142 + "NMake Makefiles", but v3.11.4 does work.

I get the same errors compiling the parse_context.h file:

...parse_context.h(749): error C2491: 'google::protobuf::internal::PackedEnumParser': definition of dllimport function not allowed
...parse_context.h(765): error C2491: 'google::protobuf::internal::PackedEnumParserArg': definition of dllimport function not allowed

This can be solved by not exporting the method definitions for PackedEnumParser and PackedEnumParserArg in src/google/protobuf/parse_context.h.
Removing the PROTOBUF_EXPORT_TEMPLATE_DEFINE attribute in lines 747 and 763 makes them build fine as shared libraries.

Here is a patch:

Index: src/google/protobuf/parse_context.h
===================================================================
--- src/google/protobuf/parse_context.h
+++ src/google/protobuf/parse_context.h
@@ -744,7 +744,7 @@
     void* object, const char* ptr, ParseContext* ctx);

 template <typename T>
-PROTOBUF_EXPORT_TEMPLATE_DEFINE
+// PROTOBUF_EXPORT_TEMPLATE_DEFINE do not export definition
 PROTOBUF_MUST_USE_RESULT const
     char* PackedEnumParser(void* object, const char* ptr, ParseContext* ctx,
                            bool (*is_valid)(int), InternalMetadata* metadata,
@@ -760,7 +760,7 @@
 }

 template <typename T>
-PROTOBUF_EXPORT_TEMPLATE_DEFINE
+// PROTOBUF_EXPORT_TEMPLATE_DEFINE do not export definition
 PROTOBUF_MUST_USE_RESULT const
     char* PackedEnumParserArg(void* object, const char* ptr, ParseContext* ctx,
                               bool (*is_valid)(const void*, int),

Tested on all these platforms:

  • Ubuntu:

    • 16.04 - GCC5

    • 18.04 - GCC7

  • Windows 10:

    • Visual Studio 2015

    • Visual Studio 2017

    • Visual Studio 2019

  • macOS:

    • Mojave - Apple LLVM version 10.0.1 (clang-1001.0.46.4)

    • Catalina - Apple clang version 11.0.3 (clang-1103.0.32.62)

@jjELT
Could you help double check with 3.12.3?
You said 3.12.2/3.12.3 failed but 3.12.3 seems good to me.

Also can someone help clarify if this is fixed silently?
If so I can close the issue.

OK things start to get more strange.
3.12.3 works for me but 3.12.4 failed again.

This might be the reason for non-monotonicity
https://github.com/protocolbuffers/protobuf/issues/7637

@xkszltl: I checked again. None of the versions 3.12.2, 3.12.3 nor 3.12.4 work for me out of the box.

Only after manually applying @eldruin's fix mentioned above it works (tested only with v3.12.4).

This can be solved by not exporting the method definitions for PackedEnumParser and PackedEnumParserArg in src/google/protobuf/parse_context.h.
Removing the PROTOBUF_EXPORT_TEMPLATE_DEFINE attribute in lines 747 and 763 makes them build fine as shared libraries.
[...]

3.13.0 seems working. Can anyone confirm?

We were able to skip applying the patch in 3.13.0 ( https://github.com/conda-forge/libprotobuf-feedstock/pull/67 ). Would be great if there was some kind of test introduced for this issue.

I also run into this problem while packaging 3.12.4 for Conan

https://github.com/conan-io/conan-center-index/pull/2037#issuecomment-725472912

Was this page helpful?
0 / 5 - 0 ratings