繁体   English   中英

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

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

我想在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 函数。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM