Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to have multiple main programs: one for client and one for server?
How to have multiple main programs: one for client and one for server? [message #174244] Thu, 03 August 2006 21:21 Go to next message
Eclipse UserFriend
Originally posted by: siegfried.heintze.com

I'm running CDT 3.0.2 on Eclipse 3.1.2 and I'm confused. I created a project
with two main C++ programs: one for the socket client and one for the socket
server. It was working on my notebook. I committed to a CVS repository and
checked it out on my desktop.

Now when I compile and try to run with eclipse, it tells me there are two
main programs. When I rename the server program to be tmain, the client
program works (well, it fails the way it is supposed to because there is no
server running).

How can I have two main programs again and run them simultaneously so I can
test them?
Thanks,
Siegfried
Re: How to have multiple main programs: one for client and one for server? [message #174252 is a reply to message #174244] Thu, 03 August 2006 23:03 Go to previous messageGo to next message
Nathan Beaulieu is currently offline Nathan BeaulieuFriend
Messages: 7
Registered: July 2009
Junior Member
Siegfried Heintze wrote:

> How can I have two main programs again and run them simultaneously so I can
> test them?
> Thanks,
> Siegfried

If you need to debug both at the same time (Assuming you can only debug
one program at a time):
1: Multithreading
2: Put client in different workspace altogether and debug with two
instances of Eclipse, one for each project.

If you can debug one at a time:
1: Compile server and run the .exe then debug the client...

Regards,
Nathan
Re: How to have multiple main programs: one for client and one for server? [message #174258 is a reply to message #174252] Fri, 04 August 2006 01:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: siegfried.heintze.com

But on the notebook computer, I had both main programs in same CVS
repository and it did not try to link both main programs into the same
executable. Is there a way I can reproduce this on my desktop after having
checked out the project from the same CVS repository the notebook committed
to?

thanks,
Siegfried
Re: How to have multiple main programs: one for client and one for server? [message #174265 is a reply to message #174244] Fri, 04 August 2006 06:09 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
You should create a Debug Configuration for both applications: In the menu
select Run->Debug .. and choose C/C++ Local Application. In the Main tab
you select the Project and the corresponding Executable. Repeat these
steps for both client and server app.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: How to have multiple main programs: one for client and one for server? [message #174404 is a reply to message #174265] Fri, 04 August 2006 18:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: siegfried.heintze.com

When I go to run->Debug I don't see "C/C++ Local Appliation". What am I
doing wrong? I've tried hi-lighting the project and the main file containing
the main program.

I'm running 3.1.2 eclipse and cdt 3.0.2.

Thanks,
Siegfried

"Axel Mueller" <aegges@web.de> wrote in message
news:ee2bcef26acb1bff7318fe2cea0d9bad$1@www.eclipse.org...
> You should create a Debug Configuration for both applications: In the menu
> select Run->Debug .. and choose C/C++ Local Application. In the Main tab
> you select the Project and the corresponding Executable. Repeat these
> steps for both client and server app.
>
>
Re: How to have multiple main programs: one for client and one for server? [message #174558 is a reply to message #174404] Mon, 07 August 2006 10:28 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Well, I am using the latest Eclipse 3.2 with CDT 3.1. But AFAIK this
option was also available in CDT 3.0.

What do you see when you right-click on the project with the executable
and select "Debug As" ?


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Grouping of Header Files in c/c++ Projects Pane
Next Topic:Will CTD support MS Csharp development?
Goto Forum:
  


Current Time: Fri Apr 19 20:28:01 GMT 2024

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

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

Back to the top