我试图获得Cadventure-txt进行编译,但我一直收到Undefined symbols for architecture x86_64
错误。我读到SO来找到一个可能的解决方案,但迄今为止,无济于事。体系结构x86_64的未定义符号:Cadventure-txt
我没有改变github上可用的文件。如果任何人都可以理解下面的错误,这将非常好:)我对C和编程颇为陌生,所以我对从何处开始调试这样的错误没有太多线索。
以下是完整的错误:
开始ld
Undefined symbols for architecture x86_64:
"_is_command", referenced from:
_init in main.o
_play in main.o
"_is_letter", referenced from:
_init in main.o
_play in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
你应该提供产生这个错误的编译命令。 – Martin
@Martin:我使用Xcode,它在我构建时发生。如果我尝试将它编译为命令行,我使用:'gcc Cadventure-txt.c -o cadventure adventure.story' –
您无法使用'gcc'编译'adventure.story'。它不是'c'文件。这会给你另一个错误。 – Martin