Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
Help
»
Error during program compilation
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Error during program compilation (Read 2287 times)
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.
Logged
Miguel Gimenez
Developer
Lives here!
Posts: 1581
Re: Error during program compilation
«
Reply #1 on:
May 28, 2023, 05:25:44 pm »
The prototype must end with a semicolon.
Logged
stahta01
Lives here!
Posts: 7597
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.
Logged
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
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
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
Help
»
Error during program compilation