Skip to content

'_XCR_XFEATURE_ENABLED_MASK' was not declared in this scope #11

@MajsterTynek

Description

@MajsterTynek

src/x86/cpu_x86.cpp:66:42
src/x86/cpu_x86.cpp:76:38

G++ (Rev2, Built by MSYS2 project) 9.3.0
cmake version 3.17.2

built using cmake ., cmake --build . on Zen CPU

D:\downloads\Downloads\FeatureDetector-master>cmake .
-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /mingw64/bin/c++.exe
-- Check for working CXX compiler: /mingw64/bin/c++.exe - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /d/downloads/Downloads/FeatureDetector-master

D:\downloads\Downloads\FeatureDetector-master>cmake --build .
[ 25%] Building CXX object src/x86/CMakeFiles/FeatureDetector.dir/cpu_x86.cpp.o
D:/downloads/Downloads/FeatureDetector-master/src/x86/cpu_x86.cpp: In static member function 'static bool FeatureDetector::cpu_x86::detect_OS_AVX()':
D:/downloads/Downloads/FeatureDetector-master/src/x86/cpu_x86.cpp:66:42: error: '_XCR_XFEATURE_ENABLED_MASK' was not declared in this scope
   66 |         uint64_t xcrFeatureMask = xgetbv(_XCR_XFEATURE_ENABLED_MASK);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
D:/downloads/Downloads/FeatureDetector-master/src/x86/cpu_x86.cpp: In static member function 'static bool FeatureDetector::cpu_x86::detect_OS_AVX512()':
D:/downloads/Downloads/FeatureDetector-master/src/x86/cpu_x86.cpp:76:38: error: '_XCR_XFEATURE_ENABLED_MASK' was not declared in this scope
   76 |     uint64_t xcrFeatureMask = xgetbv(_XCR_XFEATURE_ENABLED_MASK);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [src/x86/CMakeFiles/FeatureDetector.dir/build.make:83: src/x86/CMakeFiles/FeatureDetector.dir/cpu_x86.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:143: src/x86/CMakeFiles/FeatureDetector.dir/all] Error 2
gmake: *** [Makefile:104: all] Error 2

D:\downloads\Downloads\FeatureDetector-master>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions