任务配置中的当前目录仅适用于一台计算机 [英] Current directory in task configuration works well only on one computer

查看:86
本文介绍了任务配置中的当前目录仅适用于一台计算机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个名为main.c的简单程序,它由makefile编译,两个文件都在名为&vsbsp; vsCleanTry的文件夹中。      

I have written some simple program named main.c which is compiled by a makefile, and both files are at folder named vsCleanTry.      

我在VS 2017打开了此文件夹,然后在其中配置了以下任务:         

I opened this folder at VS 2017, and then configured the following task in it:         

当我点击"PWD"时在我的电脑中,我得到了以下想要的输出:

When I click on "PWD" in my computer, I get the following wanted output:

/ cygdrive / j / vsClean尝试 

/cygdrive/j/vsCleanTry 

但是当我尝试从同样的事情做同样的事情一台不同的计算机(使用相同的操作系统)输出是:        

But when I try to do the same thing from a different computer (that uses same operating system) the output is:        



/ cygdrive / c / Users / johnOf / source               



这是有问题的,因为我想配置另一个依赖于该文件夹路径的任务作为工作目录。           


  ;                   

                    


你知道吗?为什么我在另一台计算机上得到不同的结果?如何在计算机上修复它?

Do you know why I get different results on the other computer and how can I fix it to be like in my computer?

推荐答案

VS必须启动在另一台计算机上的不同目录中。 你甚至在另一台计算机上安装了J:驱动器吗?

VS must be starting up in s different directory on the other computer.  Do you even have the J: drive on the other computer?

无论如何,你的任务都应该使用绝对路径名。 使您的任务相对于基本位置,然后它们可以在任何地方工作。

Your tasks should noy be using absolute pathnames anyway.  Make your tasks relative to the base location, then they'll work anywhere.


这篇关于任务配置中的当前目录仅适用于一台计算机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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