【发布时间】:2021-03-26 01:06:19
【问题描述】:
我正在开发一个嵌入式项目,但由于以下错误而难以编译它:mipsel-linux-gnu-ld: main.o: in function 'fooBar':main.c:(.text+0x3ec): undefined reference to 'memcpy'
这个错误是由与此类似的每个操作引起的,其中我将指针的值分配给非指针类型的变量。
int a = 0;
int *ap = &a;
int c = *ap; //this causes the error
这是另一个例子:
state_t *exceptionState = (unsigned int) 0x0FFFF000;
currentProcess->cpu_state = *excepetionState; //this causes the error
我已经在 makefile 中包含了标志 -nostdlib...
提前谢谢!
【问题讨论】: