Qt - Visual Studio - 在多台计算机上使用项目 [英] Qt - Visual Studio - Work with projects on multiple computers

查看:296
本文介绍了Qt - Visual Studio - 在多台计算机上使用项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在多台计算机(工作/家庭)上使用相同的Visual Studio项目,使用Dropbox在两者之间进行同步。因为VS创建了一些额外的大文件,我在上传到Dropbox之前删除了以下内容:

I work with the same Visual Studio projects on multiple computers (work/home) using Dropbox to sync between the two. Because VS creates some extra large files, I used to remove the following before uploading to Dropbox:


  • Files = .pdb,sdf,.ilk .exe .tmp

  • Folders = ipch /,Release /,Debug /,GeneratedFiles /

一切都在过去很好,但是,一些问题现在上升。
我收到以下错误:

Everything worked fine in the past, however, some problems have now risen. I receive the following errors:

Moc'ing CodeInterface.h...
1>  The system cannot find the path specified.
1>  Moc'ing ThreadWorker.h...
1>  The system cannot find the path specified.
1>  Rcc'ing StreamAnalyser.qrc...
1>  The system cannot find the path specified.
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 3. 

所以,我想我可能需要创建一个新的Visual Studio项目并手动导入类。所以我的问题是:

So, I think I may have to create a new Visual Studio project and import the classes manually. So my question are:


  • 在不同计算机上处​​理项目的最佳做法?

  • 可以删除(用于上传到Dropbox)?

  • Visual Studio有一些全局设置(或类似于'workspace'如何设置这些设置以防止在不同计算机上使用时出现问题?

谢谢!

推荐答案

我不熟悉dropbox,所以我不能说你当前做什么

I am not familiar with dropbox so I can't speak for what you do currently

我想做的是使用分布式版本系统(我使用 git )来管理源代码。我使用 .gitignore 文件不会版本任何目标代码和Visual Studio项目文件等。然后,我可以轻松克隆这些项目(包括版本控制)到我喜欢的任何计算机 - 包括测试分支,我可能在回家的笔记本电脑上的火车上闲逛。

What I like to do is to use a distributed versioning system (I use git) to look after the source code only. I use a .gitignore file to not version any object code and visual studio project files and the like. I can then clone these projects (with their versioning) easily across to any computer I like - including test branches that I might idly play with when coming home on the train on my laptop.

在我的经验视觉工作室项目文件是一个痛苦,因为不同的版本不能很好地与互相玩(1电脑有vs2005和另一个有vs2008)。为了克服这个问题,我喜欢使用 cmake 作为我的构建系统(我也包括在我的Git仓库)。 Cmake是一个元建立系统,因为它为你生成可视工作室或eclipse或autotools make文件,然后在VS或Eclipse或make中进行本机构建。

In my experience visual studio project files are a pain because different versions do not play nicely with eachother (1 computer has vs2005 and another has vs2008). To overcome this problem I like to use cmake as my build system (I include these in my git repository too). Cmake is a 'meta-build system', in that it generates the visual studio, or eclipse, or autotools make files for you, and then you do the native build in VS or Eclipse or with make.

使用这两个包一起意味着您可以在任何计算机(包括linux,mac和windows)之间复制正确版本控制的源代码,然后在该计算机上使用任何IDE构建源代码安装在该计算机上。

Using these two packages together means that you can copy properly versioned controlled source code between any computer (including linux, mac and windows) and then build the source code natively on that computer, using whatever IDE you have installed on that computer.

这篇关于Qt - Visual Studio - 在多台计算机上使用项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆