Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

several main program in a solution

Mike896
Beginner
295 Views

Hi

I have several projects (with main program for every one). They are related.

If I put them into a solution in VS2008, how can I run them one by one and also have the log file of what sequence I run them.

Do I need to unload the other projects and activate one project by one project?

Is there a better way?

Thanks.

Mike

0 Kudos
5 Replies
Mike896
Beginner
295 Views

I found if I unload a project, error message show "cannot debug because a debug target has not been specified".

Mike

0 Kudos
jimdempseyatthecove
Honored Contributor III
295 Views

Mike,

A couple of options:

1) From the IDE select a project as the startup project. Then F5 it. When done, select the next project as the startup project, then F5 again, etc...

2) Write a shell program that runs the executeables from the other projects. And run that.

3) Write a shell program, and modify your other programs such that depending on the setting of a compiler variable, the mains (each program) compiles as a subroutine and the shell program calls the subroutine. If your old code relies on program exit to cleanup or if you have subroutine name conflicts then this option (3) will be difficult to implement.

Jim Dempsey

0 Kudos
sarma_amras
New Contributor I
295 Views
Quoting - Mike896

I found if I unload a project, error message show "cannot debug because a debug target has not been specified".

Mike

Mike,

When you have added the many projects in a single VS2005 window, you can do a complete build of all the projects at a single time.

A separate build log will be created under the Debug folder of the corresponding project.

Example:

file://C:Documents and Settings105038393DesktopVC_exampleF-fileDebugBuildLog.htm

file://C:Documents and Settings105038393DesktopVC_examplesample1DebugBuildLog.htm

These are the two build log that are created for my two project which have main in both.

Hope I am clear.

0 Kudos
Mike896
Beginner
295 Views
Quoting - sarma_amras

Mike,

When you have added the many projects in a single VS2005 window, you can do a complete build of all the projects at a single time.

A separate build log will be created under the Debug folder of the corresponding project.

Example:

file://C:Documents and Settings105038393DesktopVC_exampleF-fileDebugBuildLog.htm

file://C:Documents and Settings105038393DesktopVC_examplesample1DebugBuildLog.htm

These are the two build log that are created for my two project which have main in both.

Hope I am clear.

No. I have a "Console1" solution containing "Console1" and "Console2" projects.

When I press Ctrl-Shift-B, Console2 is not compiled.

If I rebuild the solution, two will be compiled and linked

Mike

0 Kudos
Mike896
Beginner
295 Views

Mike,

A couple of options:

1) From the IDE select a project as the startup project. Then F5 it. When done, select the next project as the startup project, then F5 again, etc...

2) Write a shell program that runs the executeables from the other projects. And run that.

3) Write a shell program, and modify your other programs such that depending on the setting of a compiler variable, the mains (each program) compiles as a subroutine and the shell program calls the subroutine. If your old code relies on program exit to cleanup or if you have subroutine name conflicts then this option (3) will be difficult to implement.

Jim Dempsey

1. Right-Click on solution.

2. Set multiple startup projects.

Then I find two projects are running simultaneously.

Mike

0 Kudos
Reply