manejar los mismos archivos de encabezado en múltiples proyectos en una solución

I currently have a solution with two different projects say A y B. Both the projects use a class say foo. Currently both the projects have a copy of foo. The problem is whenever I make a change (say add/remove a property) in foo I have to make the changes in the other project too. I know in C# I could create a separate project and reference it in all other projects. However I dont know how to do this in c++ VS2010. Is this the best approach here any suggestions ?

preguntado el 05 de mayo de 13 a las 18:05

1 Respuestas

There are the same possibilities in C++ (Win)

Puede crear un biblioteca estática which you link to, or a biblioteca dinámica (dll) that you load dynamically. Either way you have a header with the class. You could try the easier approach and that is with a static library

contestado el 05 de mayo de 13 a las 19:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.