MinGW安装目录 [英] MinGW installation directory

查看:591
本文介绍了MinGW安装目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在我的编程语言中使用MinGW.即使指定了完整路径,即使在PATH环境变量中进行了设置,我也只能在C#中运行二进制文件.我正在使用System.Diagnostics.Process类.

Hi,

I want to use MinGW in my programming language. I only can run the binaries in C# if I specify the full path, even if I set it in the PATH environment variable. I''m using System.Diagnostics.Process class. Is there any way to know where MinGW is installed or how can I run it without specifying its path?

推荐答案

我不认为修改path的方法是什么?环境变量不起作用.

您会再尝试一次,更彻底吗?有一个微妙的时刻,有些小姐.您正在运行一些Shell应用程序(例如Explorer或CMD.EXE),并将其他应用程序作为子进程启动.如果您在两者之间更新了path环境变量,则您的父进程仍不会收到有关更改的通知.您需要重新启动它,以考虑您的修改.

小心:我的意思不是您的应用程序使用MinGW,而是您用来启动应用程序的某些父进程(Shell或控制台).重新启动.
请检查一下.


要使用代码运行控制台应用程序,请使用System.Diagnostic.Process.Start,重定向标准输入,输出和错误流.请参阅有关更多信息:自定义命令行程序(窗体) [ ^ ],询问如果您遇到问题,请跟进一个问题.

—SA
I don''t think the modification of path environment variable is not working.

Would you try it again, more thoroughly. There is one delicate moment some miss. You''re running some Shell application like Explorer or CMD.EXE and start other application as a child process. If you updated your path environment variable in between, your parent process remains not notified about the change. You need to re-start it for your modification to be taken into account.

Careful: I don''t mean your application using MinGW, I mean some parent process (Shell or console) you use to start your application. Restart it.
Please check it up.


To run a console application from you code, use System.Diagnostic.Process.Start, redirect standard input, output and error streams. See for more information: Custom Command Line program (Form)[^], ask a follow-up question if you face a problem.

—SA


这篇关于MinGW安装目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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