Author Topic: Error during program compilation  (Read 2028 times)

Offline Fredy

  • Single posting newcomer
  • *
  • Posts: 3
Error during program compilation
« on: May 28, 2023, 05:15:56 pm »
Hi,
I am using codeblocks release 20.03. Recently installed. I get a warning message "main is usually a function" and a syntax error when I use user-defined functions. Any ideas?

The screenshot attached shows a simple program, for instance.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Error during program compilation
« Reply #1 on: May 28, 2023, 05:25:44 pm »
The prototype must end with a semicolon.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Error during program compilation
« Reply #2 on: May 28, 2023, 06:25:09 pm »
Please use code tags see link for how https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

The prior posted already answered what was the cause of the error.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Fredy

  • Single posting newcomer
  • *
  • Posts: 3
Re: Error during program compilation
« Reply #3 on: May 28, 2023, 08:55:43 pm »
That did fix the issue, thank you all