我目前正在研究我的第一个"严肃"的C项目,一个16位的虚拟机.当我将文件从一个大的源文件拆分成多个源文件时,链接器(无论是通过clang,gcc,cc还是ld调用)都会发出错误:
ld: duplicate symbol _registers in register.o and main.o for inferred
architecture x86_64
Run Code Online (Sandbox Code Playgroud)
registers主文件中没有任何声明.uint16_t如果有帮助,它是一个数组.我使用内置编译器(不是GNU gcc)在Mac OS 10.7.3上.有帮助吗?