Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
xkszltl opened this issue May 27, 2020 · 15 comments
Closed
Assignees
Labels
c++ inactive Denotes the issue/PR has not seen activity in the last 90 days. windows

Comments

@xkszltl
Copy link
Contributor

xkszltl commented May 27, 2020

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
@xkszltl
Copy link
Contributor Author

xkszltl commented May 27, 2020

FYI 3.11.4 is working.

@JonLiu1993
Copy link

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.

@YeHaijia
Copy link

YeHaijia commented Jun 9, 2020

same problem. how to solve?

@jjELT
Copy link

jjELT commented Jun 10, 2020

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

@eldruin
Copy link

eldruin commented Jul 24, 2020

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)

xkszltl added a commit to xkszltl/Roaster that referenced this issue Jul 27, 2020
  - protocolbuffers/protobuf#7567
gRPC 1.30 requires Protobuf 3.12 implicitly, lifting the bar to make both of them work.
@xkszltl
Copy link
Contributor Author

xkszltl commented Jul 27, 2020

@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.

@xkszltl
Copy link
Contributor Author

xkszltl commented Jul 29, 2020

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

@xkszltl
Copy link
Contributor Author

xkszltl commented Jul 29, 2020

Looks like friends from conda double confirm the issue:
conda-forge/libprotobuf-feedstock#56
conda-forge/libprotobuf-feedstock#59
conda-forge/libprotobuf-feedstock#57
conda-forge/libprotobuf-feedstock#62

@xkszltl
Copy link
Contributor Author

xkszltl commented Jul 31, 2020

This might be the reason for non-monotonicity
#7637

@jjELT
Copy link

jjELT commented Aug 3, 2020

@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.
[...]

@xkszltl
Copy link
Contributor Author

xkszltl commented Sep 10, 2020

3.13.0 seems working. Can anyone confirm?

@jakirkham
Copy link

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

@Croydon
Copy link

Croydon commented Nov 11, 2020

I also run into this problem while packaging 3.12.4 for Conan

conan-io/conan-center-index#2037 (comment)

@elharo elharo added the windows label Sep 2, 2021
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Mar 10, 2024
Copy link

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ inactive Denotes the issue/PR has not seen activity in the last 90 days. windows
Projects
None yet
Development

No branches or pull requests

10 participants