Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » mutiple definitions error in a C project(when i was running multiple files in a project it showed me multiple main definition error)
mutiple definitions error in a C project [message #1773692] Tue, 03 October 2017 01:50 Go to next message
Eclipse UserFriend
No Message Body
Re: mutiple definitions error in a C project [message #1773889 is a reply to message #1773692] Fri, 06 October 2017 03:51 Go to previous message
Eclipse UserFriend
You can only have one function called "main" per executable.
In fact, ALL function names should be unique.
It seems you have defined main twice in projects basic and basic2.
If you intended multiple executables (say hello in project basic and prime_numbers in project basic) they should be in separate projects.

It's possible to have more than one executable per project but you would have to write your own makefile.
Previous Topic:Launch Failed. Binaries not found.
Next Topic:cygwin/mingw support needed
Goto Forum:
  


Current Time: Sat Mar 22 00:03:21 EDT 2025

Powered by FUDForum. Page generated in 0.02501 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top