[Seek Help] 使用gcc、g++编译c++都文件出现问题 Resolved
Tofloor
poster avatar
喵呢酱
deepin
2022-04-29 06:35
Author

不知道为什么会这样。sob

截图_deepin-terminal_20220428223456.png
截图_选择区域_20220428223241.png

Reply Favorite View the author
All Replies
charm
deepin
2022-04-29 06:38
#1

你确定代码没问题?

Reply View the author
喵呢酱
deepin
2022-04-29 06:45
#2
charm

你确定代码没问题?

这不是代码报错

Reply View the author
神末shenmo
deepin
Spark-App
Q&A Team
2022-04-29 06:46
#3

把代码发上来吧,看看别人能不能编译过

如果不能,那就是你代码有问题

Reply View the author
charm
deepin
2022-04-29 06:50
#4
喵呢酱

这不是代码报错

undefined reference to `main`

这报错明显没找到main()入口函数

Reply View the author
enforcee
deepin
2022-04-29 06:54
#5

int mian()

是不是你

joy

Reply View the author
theaking
deepin
2022-04-29 07:44
#6

厉害了

Reply View the author
ari_zhou
deepin
2022-04-29 15:14
#7

/tmp/cccXObj.o:function mian。。。。

是main不是mian啊doubt

Reply View the author
喵呢酱
deepin
2022-04-29 15:16
#8
enforcee

int mian()

是不是你

joy

好的,我不需要视力joy

Reply View the author
喵呢酱
deepin
2022-04-29 15:17
#9
ari_zhou

/tmp/cccXObj.o:function mian。。。。

是main不是mian啊doubt

我确实得到眼科看看了😄

Reply View the author
如何优雅deepin
deepin
2022-04-29 18:07
#10

我一眼就看到了,main

Reply View the author
blue_whale
deepin
2022-04-29 21:38
#11

图片.png

gcc编译C可以, 编译C++不行

g++倒是可以随意编译两种文件

主函数是个好东西, 下次不要记错了shamed

Reply View the author