GNU GCC compilor error “multiple definition of main”

前端 未结 3 1093
天涯浪人
天涯浪人 2021-01-24 00:38

I am new to ubuntu, now I need to develop my assignment in C++. I am using codeblocks IDE to write c++ programs. Whenever I compile something in it, it gives these errors:

3条回答
  •  粉色の甜心
    2021-01-24 01:13

    It seems that your IDE is not just compiling one single file, but another one which also contains a definition of the main function. Please check out how many files are being compiled.

    In addition, your compiled is treating all the warnings as errors (-Werror) or disable this flag.

提交回复
热议问题