Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 05:50 Go to next message
salmon raj is currently offline salmon rajFriend
Messages: 1
Registered: October 2017
Junior Member
No Message Body
Re: mutiple definitions error in a C project [message #1773889 is a reply to message #1773692] Fri, 06 October 2017 07:51 Go to previous message
David Vavra is currently offline David VavraFriend
Messages: 627
Registered: October 2012
Senior Member
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:Error Starting Process: Cannot create pty
Goto Forum:
  


Current Time: Tue Dec 12 14:20:12 GMT 2017

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

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