Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Multiple main
Multiple main [message #874917] Mon, 21 May 2012 19:53 Go to next message
Martin H is currently offline Martin HFriend
Messages: 2
Registered: May 2012
Junior Member
I'm in a project that requires multiples main for some reason.

So I tried to define different files, for example:

main
int main(int argc,char** argv)

mainA
int mainA(int argc,char** argv)

mainB
int mainB(int argc,char** argv)

And I want to call mainA and mainB for the principal main and I get the multiple main definition!!

If that doesn't work can be possible in Eclipse to generate two executables in the same project?
Re: Multiple main [message #875287 is a reply to message #874917] Tue, 22 May 2012 13:24 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
You have to use a different build configuration for each executable.

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Indexer ... it seems I cant get how it is supposed to work
Next Topic:Ubuntu + Eclipse CDT
Goto Forum:
  


Current Time: Wed Apr 24 16:21:40 GMT 2024

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

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

Back to the top