You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cc -o any_test.out any_test.o
Undefined symbols for architecture x86_64:
"_any", referenced from:
_main in any_test.o
ld: symbol(s) not found for architecture x86_64
解决方法:Makefile规则%_test.out放在%.out之前(在macOS上,一个目标匹配多个模式规则时,make并不是像文档10.5.4 How Patterns Match中所说选择匹配最准确的规则,而是选择第一个匹配的规则)
第3章
问题3
第4章
问题1、3
第5章
问题1、2、3,包括子目录
第6章
问题3
第7章
问题3
问题4:浮点计算规则差异导致以下单测失败
Testing rudimentary_calculator.out...9c9
< -nan
---
> nan
The text was updated successfully, but these errors were encountered:
当前的代码在Linux系统上可以编译通过,但是在macOS系统上会报错,每一章存在的问题如下:
第1章
问题1:
getline
函数与标准库<stdio.h>中的函数冲突解决方法:在Makefile的
CFLAGS
变量后添加-D _ANSI_SOURCE
第2章
问题2:clang编译器不识别
-Wno-builtin-declaration-mismatch
选项解决方法:改为
-Wno-incompatible-library-redeclaration
问题3:_test.out构建规则匹配错误
解决方法:Makefile规则%_test.out放在%.out之前(在macOS上,一个目标匹配多个模式规则时,make并不是像文档10.5.4 How Patterns Match中所说选择匹配最准确的规则,而是选择第一个匹配的规则)
第3章
问题3
第4章
问题1、3
第5章
问题1、2、3,包括子目录
第6章
问题3
第7章
问题3
问题4:浮点计算规则差异导致以下单测失败
The text was updated successfully, but these errors were encountered: