解决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!
#endif*/
搞定
上一篇:Confluence 6 在你的 LDAP 目录中优化用户和用户组数量


下一篇:最全面的 Spring 学习笔记