473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Shared .cpp files and source control

Hi,

I'm not sure if this is truly a C++ question, but it's something that
has only come up now that I'm working in a C++ environment.
Essetnially, what has happened is that I've come in to a new job where
there has been no form of source control and been asked to co-ordinate
the implementation of one. I was nice and comforable with the task
until I found out about a practice that wasn't used in my previous C
programming job.

What is happening is that people are creating classes in .cpp files, as
you might expect, within a module and compiling them in there. No
problem, except that they also choose to compile them in other modules
too by making explicit references to them, e.g.
X:\devel\src\aModule\sharedclass.cpp. Notice that X:\ is a network
drive containing the master copy of our code.

This has worked fine for them in the past (even though it forces them
to make possibly untested code public), but moving over to a source
code repository instead has me scratching my head for the best way to
cope with this.

I had thought of changing the explicit references to become relative,
so ..\..\src\aModule\sharedclass.cpp, but this means that compilation
wouldn't work unless the person had checked out all modules containing
..cpp files required by the module they're really working on and have
checked out in their local area. Since the area set aside for such
files appears to be 1.2GB, I'd prefer not to have to do that.

I guess the first question I have is whether the sharing of .cpp files
like this is good C++ practice. My way of thinking would have been to
have a separate library containing the class - and maybe some others -
and having all modules that want access to it link it in. However,
this process is so widespread in the company that I'm thinking that I
must be missing something.

Even if it is bad practice, it looks like it's something I'm going to
have to account for in the short to medium term anyway. Are there
better solutions than to force everyone to constantly have the shared
area checked out and up-to-date?

As we're working with Visual C++, it's possible to easily change the
location it's looking for the shared file in during development, then
change it back before committing the change, but I'm trying to avoid
this. For one, it's a fiddle and, secondly, it's just asking for
someone - probably me - to forget to change the path back.

Any thoughts and help would be appreciated. It would be nice to be
able to come up with a good solution as opposed to the far from perfect
one I have at the moment.

Thanks,

Adam.

Jul 23 '05 #1
1 1728
ad******@yahoo.com wrote:
I'm not sure if this is truly a C++ question, [..]
It's not.
[...]
As we're working with Visual C++, [...]

Any thoughts and help would be appreciated. It would be nice to be
able to come up with a good solution as opposed to the far from perfect
one I have at the moment.


Two places I think are relevant to your question and you should check
them out:
microsoft.public.vc.project_mgt
comp.software-eng

That's where version control systems should be discussed.

Also, if you have picked a couple of version control systems to look at,
contact the vendors and ask them to help you find your solution. They
will be happy to work with you if you decide to buy their systems.

V
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Hubert Wong | last post by:
Hi, I am writing some C# code that moves files from a source folder to a target folder on the same machine. However, if the target folder is a shared folder, using the File.MoveTo method alone...
4
by: Sijmen Grunbauer | last post by:
Hi, We have a VS.Net solution with numerous C# projects. Each time we want to change the AssemblyCopyright or the AssemblyTrademark, etc, we have to edit the AssemblyInfo.cs in each project,...
3
by: Steve Brecher | last post by:
VS.NET help on deployment indicates that, while using a deployment project requires administrative access to IIS, " we recommend deploying your project in most cases, because it allows you to take...
2
by: sotto | last post by:
I'm building a control with a property which values depend on the current different files in a resourcefile. Users that use my control can edit the property by selecting from a dropdownlist which...
4
by: Robert Schneider | last post by:
I'm using subversion. But I guess this is not important for the issue. So which files of a VB project should be (at least) under source control? Or which ones definitly not? I know from VB6...
7
by: Ibrahim. | last post by:
Hello, How can I access a Shared Folder of the Server by using the following control. 1. I need to download files from c:\resumes folde by using the following; <asp:HyperLink...
22
by: MarkusR | last post by:
I am currently using StarTeam for my source control. (Will eventual switch to whatever the latest Visual Source Safe is going to be called). With debug, installers, deploy and everything the...
4
by: herbert | last post by:
I am coding a dozen "background" realtime apps for factory automation in .NET 2.0. The apps need to share a common memory as there are lots of variables to be shared (and synchronized of...
4
by: stuntgoat | last post by:
Hi, I want to start using Python 2.6 and 3000. I have several questions. What, in your experiences, is a functionally elegant solution to installing 2.6 and 3 from source without breaking...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.