English 中文(简体)
Better way to share header file between separate vc project?
原标题:

How would you organize your vc projects source code to share the same header file?

  1. put the header in a common folder, and have every vc projects include it.
  2. put the header in a vc project, and have the other projects include it as a link.
  3. copy the header file into every vc project

any better solution?

问题回答

To my mind, option 1 is preferable.

Option 2 sounds a little VC-specific and I m not sure I d do things that way.

The worst "smelling" option is option 3, at least the way you ve presented it.

Before deciding, though, you should consider what version control system you re using. Some allow mapping of a singular file in the repository to several different places on the hard drive. We use this technique to enforce a "contract" (interface) between an Linux system and our Windows main application.

That way, all vc projects have "a copy in very project" but the source of each copy is a single file in the repository.





相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签