- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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
- Etiquetas:
- Intel® Fortran Compiler
Enlace copiado
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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).
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
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.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Informe de contenido inapropiado
It was top selection of Build: Build Solution
Jim
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla