I've had this error for weeks I already made a post about it but it wasn't very clear.
(我已经有数周的时间出现了这个错误,我已经对此发表了一篇文章,但不是很清楚。)
So I am calling a function from aa header file myBmpGris.h and the functions are implemented on the file myBmpGris.c .
(所以我从头文件myBmpGris.h调用一个函数,并且这些函数在文件myBmpGris.c上实现。)
Here is my main file: (这是我的主文件:)
#include<stdio.h>
#include<stdlib.h>
#include "myBmpGris.h"
int main(){
char * image_name = "image_carre.bmp";
BmpImg image = readBmpImage(image_name);
return 0;
I compile by using ggc main.c
and I get this error message :
(我通过使用ggc main.c
编译,并收到以下错误消息:)
Undefined symbols for architecture x86_64:
(架构x86_64的未定义符号:)
"_readBmpImage", referenced from:
(“ _readBmpImage”,引用自:)
_main in main-1c453a.o
(_main在main-1c453a.o中)
ld: symbol(s) not found for architecture x86_64
(ld:找不到架构x86_64的符号)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(clang:错误:链接器命令失败,退出代码为1(使用-v查看调用))
I read a lot of posts about the same error message but none of the answers seem to apply to my case.
(我读了很多关于同一错误消息的文章,但似乎没有答案适用于我的情况。)
I'm kind of desperate because a lot of my programs give me the same error. (我有点绝望,因为我的很多程序都给我同样的错误。)
What should I do ? (我该怎么办 ?)
ask by Sam_Bad translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…