所以我正在尝试使用我文件(file2.c)中另一个C(file1.c)文件中定义的函数.我要包含file1(file1.h)的头文件才能执行此操作.
但是,每当我尝试使用gcc编译文件时,我都会收到以下错误:
Undefined symbols for architecture x86_64:
"_init_filenames", referenced from:
_run_worker in cc8hoqCM.o
"_read_list", referenced from:
_run_worker in cc8hoqCM.o
ld: symbol(s) not found for architecture x86_64
Run Code Online (Sandbox Code Playgroud)
我被告知我需要"将目标文件链接在一起"才能使用file2中file1的功能,但我不知道这意味着什么:(