【发布时间】:2020-02-08 21:41:48
【问题描述】:
我在 Linux 终端中运行的命令是:
g++ -c main.cpp fraction.cpp ; g++ -WALL -o main.o fraction.o
返回的完整输出是:
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-
gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
main.cpp 是我的教授写的,他正在对照它检查我们的分数类,所以 main 应该没有错误。
【问题讨论】:
标签: c++ class compiler-errors