Open imrichardcole opened 3 days ago
To work around this, I can set the following in my own CMakeLists.txt:
if(32_BIT_BUILD)
add_definitions(ProjectLib "/arch:SSE2")
endif()
But would need to understand this workaround in the context of the wider application.
What version of protobuf and what language are you using?
28.0
What operating system (Linux, Windows, ...) and version?
Windows 10 Enterprise and Windows 2016 server
What runtime / compiler are you using (e.g., python version or gcc version)
Latest MSVC v143
What did you do?
I've built protobuf from the v28.0 tag using MSVC v143. I then go onto use these builds in my own project. My x64 build compiles without issue, but I run into errors when building x86.
What did you expect to see
A build that works on both x64 and x86.
What did you see instead?
I get the following two C3861 compiler errors:
In both cases the error is coming from the
crc32_x86_arm_combined_simd.h
header file. This comes in as an absl submodule via the protobuf git repo.Perhaps the issue is in how I'm compiling protobuf? The only CMake arg that stands out is my usage of
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF
Some intrinsic functions are found e.g
_mm_crc32_u16
and they're picked up frominclude\intrin.h
andinclude\nmmintrin.h
as part of the MSVC distribution.