Compile error : undefined reference to‘__atomic_fetch_add_4’

前端 未结 3 412
广开言路
广开言路 2021-01-19 14:52
#include 
using namespace cv;

int main()
{
  Mat img=imread(\"cornea.jpg\");
  imshow(\"src\",img);
  waitKey(0);
  return 0;
}

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-19 15:34

    On i386, you need to add -latomic as GCC cannot use assembler instructions but has to fallback on the libatomic library implementation.

    Starting with i586, atomic instructions are available and linking against libatomic is no longer required. That means, the alternative of -latomic is to use -march=i586.

提交回复
热议问题