Code::Blocks Forums

User forums => Help => Topic started by: Fredy on May 28, 2023, 05:15:56 pm

Title: Error during program compilation
Post by: Fredy 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.
Title: Re: Error during program compilation
Post by: Miguel Gimenez on May 28, 2023, 05:25:44 pm
The prototype must end with a semicolon.
Title: Re: Error during program compilation
Post by: stahta01 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 (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.
Title: Re: Error during program compilation
Post by: Fredy on May 28, 2023, 08:55:43 pm
That did fix the issue, thank you all