[Seek Help] gcc编译c源文件在预处理阶段出现问题 Resolved
Tofloor
poster avatar
消逝的时光
deepin
2022-05-15 07:49
Author

我在main.c源文件里面包含了同一个路径下的 “test.h”

test.h里面定义了 #define N 2

但是用gcc 编译main.c的时候出现错误

截图_选择区域_20220514234810.png

Reply Favorite View the author
All Replies
momen
deepin
2022-05-15 08:02
#1

是不是。。没保存??

Reply View the author
momen
deepin
2022-05-15 08:03
#2

你这也没写func函数呀,我猜你是没保存,头文件引用应该没啥问题的

Reply View the author
陌生人
deepin
2022-05-15 18:33
#3

其实有没有想过是gcc不支持这种写法

Reply View the author
enforcee
deepin
2022-05-15 19:37
#4

楼主的工作目录是first,但是文件管理器给我们看的是second

confused

Reply View the author
消逝的时光
deepin
2022-05-15 22:50
#5
momen

你这也没写func函数呀,我猜你是没保存,头文件引用应该没啥问题的

工作目录弄错了😢

Reply View the author
消逝的时光
deepin
2022-05-15 22:50
#6
momen

是不是。。没保存??

嗯嗯

Reply View the author