I currently have a solution with two different projects say A
and 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 ?
Asked
Active
Viewed 239 times
0

Rajeshwar
- 11,179
- 26
- 86
- 158
-
possible duplicate of [Sharing files between projects in Visual C++ 10](http://stackoverflow.com/questions/6170319/sharing-files-between-projects-in-visual-c-10) – hammar May 05 '13 at 18:01
1 Answers
2
There are the same possibilities in C++ (Win)
You can either create a static library which you link to, or a dynamic library (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

shivakumar
- 3,297
- 19
- 28

AndersK
- 35,813
- 6
- 60
- 86