【发布时间】:2022-11-24 18:24:27
【问题描述】:
我正在尝试完成 cs50 课程,我发现他们使用
#include <cs50.h>
唯一的问题是我现在得到
cc hello.c -o hello
/usr/bin/ld: /tmp/ccMzSNr5.o: in function `main':
hello.c:(.text+0x1a): undefined reference to `get_string'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: hello] Error 1
shell returned 2
Press ENTER or type command to continue
抱歉,如果这不是很具体或什么,我才刚刚开始,如果您需要任何额外信息,我很乐意提供帮助。(我还使用 vim 解释错误语法)
我试图让它工作,我在https://github.com/cs50/libcs50/releases 上安装了所有东西并解压缩,并从https://www.youtube.com/watch?v=RZ4p-saaQkc 安装了所有东西。
【问题讨论】:
-
看起来您链接 cs50 库的设置一团糟。
cc hello.c -o hello看起来你甚至都没有尝试过。如何正确地做到这一点应该是课程文档的一部分。
标签: c cs50 chromebook