Native atomics support not found问题解决
今天用arm-none-linux-gnueabi交叉编译libmysqclient.so,出现Native atomics support not found问题
进入mysql-connector-c-6.16-src的include/my_atomic.h,里面有
#if defined(_MSC_VER)
# include "atomic/generic-msvc.h"
#elif defined(HAVE_SOLARIS_ATOMIC)
# include "atomic/solaris.h"
#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
# include "atomic/gcc_builtins.h"
#else
# error Native atomics support not found!
#endif
简单的解决方式就说把这注释掉,在上面加上#include "atomic/gcc_builtins.h"
#include "atomic/gcc_builtins.h"
/*#if defined(_MSC_VER)
# include "atomic/generic-msvc.h"
#elif defined(HAVE_SOLARIS_ATOMIC)
# include "atomic/solaris.h"
#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
# include "atomic/gcc_builtins.h"
#else
# error Native atomics support not found!