-3

I want to compile a series of cpp files on Linux. Using CentOS 7, in the Konsole, I type "g++ -std=c++11 main.cpp canvas.cpp patch.cpp utils.cpp", and I get an error:

/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

Could anyone tell me how to solve this?

keanehui
  • 185
  • 2
  • 13
  • 1
    Please show `main.cpp`. Also see [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – jww Nov 30 '19 at 09:33

1 Answers1

-1

It seems that you don't have a main function defined.

rifkin
  • 339
  • 1
  • 6