Linux 上的编译 - 在函数“_start”中:(.text+0x20):对 'main' 的未定义引用

Compilation on Linux - In function '_start': (.text+0x20): undefined reference to 'main'

我想在Linux上编译一系列cpp文件。使用 CentOS 7,在 Konsole 中,我输入 "g++ -std=c++11 main.cpp canvas.cpp patch.cpp utils.cpp",然后出现错误:

/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status

谁能告诉我如何解决这个问题?

你好像没有定义main函数