我的编译错误消息:test.c :(。text + 0x40):未定义引用`__sync_lock_test_and_set_1'

时间:2015-08-21 07:45:47

标签: mips cross-compiling

我想编译成mips

我的测试代码在这里。

#include <stdio.h>
int main(int argc, char **argv)
{
    char a;

    a = 10;

    __sync_lock_test_and_set(&a, 1);
    __sync_lock_release(&a);

    return 0;
}

在这里编译错误信息

/tmp/ccs0M6bI.o: In function `main':
test.c:(.text+0x40): undefined reference to `__sync_lock_test_and_set_1'
collect2: ld returned 1 exit status

我的mips gcc编译器版本是4.3

(这个问题是编译器版本4.7没问题,但是我不能使用其他版本)

我该如何解决这个问题?

0 个答案:

没有答案
相关问题