Closed mgieseki closed 5 years ago
Thanks for the report,
yes I'm aware of these issues with Visual
,
and just built a Windows VM to debug them.
I have some build issues too with MSVC.
When trying to build with cmake and BUILD_SHARED_LIBS=OFF
, I got errors and some with the dllimport
I added a while ago. I think I will try to look what's causing the issue.
And here's some of the logs:
"D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj" (cible par défaut) (3) ->
(ClCompile cible) ->
D:\workspace\c\xxHash\xxHash\xxhash.c(254): error C2491: 'XXH_versionNumber' : définition de fonction dllimport non autori
sée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(431): error C2491: 'XXH32' : définition de fonction dllimport non autorisée [D:\work
space\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(455): error C2491: 'XXH32_createState' : définition de fonction dllimport non autori
sée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(459): error C2491: 'XXH32_freeState' : définition de fonction dllimport non autorisé
e [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(465): error C2491: 'XXH32_copyState' : définition de fonction dllimport non autorisé
e [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(470): error C2491: 'XXH32_reset' : définition de fonction dllimport non autorisée [D
:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(485): error C2491: 'XXH32_update' : définition de fonction dllimport non autorisée [
D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(548): error C2491: 'XXH32_digest' : définition de fonction dllimport non autorisée [
D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(575): error C2491: 'XXH32_canonicalFromHash' : définition de fonction dllimport non
autorisée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(582): error C2491: 'XXH32_hashFromCanonical' : définition de fonction dllimport non
autorisée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(864): error C2491: 'XXH64' : définition de fonction dllimport non autorisée [D:\work
space\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(887): error C2491: 'XXH64_createState' : définition de fonction dllimport non autori
sée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(891): error C2491: 'XXH64_freeState' : définition de fonction dllimport non autorisé
e [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(897): error C2491: 'XXH64_copyState' : définition de fonction dllimport non autorisé
e [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(902): error C2491: 'XXH64_reset' : définition de fonction dllimport non autorisée [D
:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(916): error C2491: 'XXH64_update' : définition de fonction dllimport non autorisée [
D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(976): error C2491: 'XXH64_digest' : définition de fonction dllimport non autorisée [
D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(1003): error C2491: 'XXH64_canonicalFromHash' : définition de fonction dllimport non
autorisée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
D:\workspace\c\xxHash\xxHash\xxhash.c(1010): error C2491: 'XXH64_hashFromCanonical' : définition de fonction dllimport non
autorisée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
d:\workspace\c\xxhash\xxhash\xxh3.h(635): error C2491: 'XXH3_64bits_withSeed' : définition de fonction dllimport non autor
isée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
d:\workspace\c\xxhash\xxhash\xxh3.h(669): error C2491: 'XXH3_64bits' : définition de fonction dllimport non autorisée [D:\
workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
d:\workspace\c\xxhash\xxhash\xxh3.h(769): error C2491: 'XXH3_128bits_withSeed' : définition de fonction dllimport non auto
risée [D:\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
d:\workspace\c\xxhash\xxhash\xxh3.h(807): error C2491: 'XXH3_128bits' : définition de fonction dllimport non autorisée [D:
\workspace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]
d:\workspace\c\xxhash\xxhash\xxh3.h(813): error C2491: 'XXH128' : définition de fonction dllimport non autorisée [D:\works
pace\c\xxHash\xxHash\cmake_unofficial\build\xxhash.vcxproj]```
(And sorry, I only have the French locale installed.)
Hello again, I made a fix for this issue: #181. Now it compiles fine with MSVC (Visual Studio 15 2017 v15.9.21).
Thanks @LambdAurora ,
compilation errors under Visual should be fixed by now.
First of all thanks for adding XXH3. It's an awesome addition to xxHash. While the recent sources build fine with MinGW, they failed to compile with MSVC (version19.16.27027, Visual Studio 2017 15.9.9) due to some unsupported
#pragma
and__attribute__
constructs. Here's the compiler output (sorry, I've only the German locale installed at the moment):