Emre Turkoz
Emre Turkoz

Reputation: 868

How to synchronize visual studio projects while working as a team?

We have a problem that we're sure that it's already solved. Our research team in the university is developing a software using Visual Studio 2010. The software we develop is based on different open source tools, which have their own libraries in their own paths at each different computer.

The open source packages are compiled with CMake. We, individually, have managed to install them and started to develop our software. But the thing is that our individually written codes don't work at each others' computers due to the differences in the path settings. How can we provide a general functionality for our codes? Should we also use CMake? We're using a repository, hg mercurial. Should we avoid committing project files to the repository and only commit header or source files? Should we perform modifications on the source which would later be configured by CMake everytime we make a change?

Thank you.

Upvotes: 0

Views: 982

Answers (3)

fdlm
fdlm

Reputation: 614

You should use CMake to generate Visual Studio project files. Commit only source, header, and the CMakeLists.txt.

Work with a seperate build path. For example, if your Project structure is like

Project\Src 
Project\Doc
Project\......

create a build folder like

Project\build

and generate the VS-Solution and Project files into this folder. CMake will (hopefully :) ) find all the libraries and set the correct include and library paths for VS. The VS project files are only generated if new source files are added to the project. CMake will detect this automatically and prompt if you want to re-generate the project files.

This is how we work and we're doing really fine. :)

Upvotes: 2

Raj
Raj

Reputation: 1163

You should use relative paths (Eg: ..\..\Include or ..\..\Libs) in your project settings(Alt+F7) rather than the absolute paths(eg: C:\Include or D:\Libs etc)

Also agree among yourselves a common folder structure for your project files.

Upvotes: 1

CodeCaster
CodeCaster

Reputation: 151594

You should set all library paths on all computers, so it'll work regardless of where the libraries are placed, as long as they're somewhere and can be found by the compiler.

Upvotes: 1

Related Questions