
[英]g++ link problems: In function `_start': (.text+0x20): undefined reference to `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.