1.ch7中,orb_self调试的时候报错:
报错内容:
error: inlining failed in call to always_inline ‘int _mm_popcnt_u32(unsigned int)’: target specific option mismatch
_mm_popcnt_u32 (unsigned int __X)
解决方案:
1.CMakeLists中,将原先的注释掉
# set(CMAKE_CXX_FLAGS "-std=c++11 -O2 ${SSE_FLAGS} -msse4")
set(CMAKE_CXX_FLAGS "-std=c++14 -mfma")
2.用vscode调试,打开task.json文件,找到参数-g
"-mpopcnt",
//"-msse4.2", //或者这个也可以