Build multiple outputs

Build multiple outputs

There may be an obvious way to do this, so apologies if this seems trivial.

I have a solution with multiple projects that produce an exe file.  I have another solution which includes a number of the same files, and which produces a dll.

I want to distribute both of these files to users (for separate purposes), but I want to make sure that they are both compiled whenever I make an update to any of the shared files.

Can I include both projects in a single solution, but producing different executables?  Is there (another) correct way to do this?

Thanks

David

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Yes, absolutely you can do this - exactly as you propose.  When you do Build Solution, it will build all projects whose dependent files have changed. If you want an example of this, see the C_Calls_Fortran sample we provide. It has four projects, two executables that share the same source, and a static library and DLL project that share a source.

Steve - Intel Developer Support

David, consult the project in the C_Calls_Fortran as Steve suggests. I think the trick here is to mak the .exe "dependent" on the .dll (even though it does not use it). You might find that dependency setup in the C_Calls_Fortran. N.B. you'd do the same thing if you made a static library as well (except the dependency walker might auto-magicaly make the .exe dependent on the .lib).

Jim Dempsey

www.quickthreadprogramming.com

There is no need to make it a dependency if there is no build order required. Build Solution will build all projects in the solution which are not "current". Dependencies affect build order (and provide library and include paths of the child project to the parent).

Steve - Intel Developer Support

Steve, with VS 2010 I have experienced where multi-execuitable solutions will only re-build the active project (start project for debugging) if I do not explicity setup a dependency by hand. Your experienced may be different. It would appear that David's experience was similar to mine.

Jim Dempsey

www.quickthreadprogramming.com

Did you do Build Solution or just build a project? I'd expect that behavior if you just built a project. I have never seen it myself if I Build Solution, not saying it couldn't happen. But I think it's not a good idea to add project dependencies that have no other purpose.

Steve - Intel Developer Support

It was top selection of Build: Build Solution

 

Jim

www.quickthreadprogramming.com

Leave a Comment

Please sign in to add a comment. Not a member? Join today