[英]Launch C program in Cygwin Environment through command line
我安装了Cygwin来编译和运行C程序。 我正在尝试使用Notepad ++作为编辑器来编写自己的Shell程序。 当我从命令行(使用nppexec)执行编译的.exe文件时,它在Cygwin环境之外运行。
以下重定向命令无法与Window的cmd一起运行:
$ sort -r < test3.txt
-rThe system cannot find the file specified.
但是在通过Cygwin的Mintty执行程序时可以使用:
$ sort -r < test3.txt
test3.txt
test.txt
sh.exe
sh.c
1.txt
我正在使用以下代码与nppexec一起运行以启动程序:
cd $(CURRENT_DIRECTORY)
gcc "$(FILE_NAME)" -o $(NAME_PART).exe
cmd.exe /c start cmd /k $(NAME_PART).exe
如何编辑以上内容以在Cygwin环境中启动?
我尝试过没有运气:
cmd /c start mintty ./$(NAME_PART).exe
Windows命令行具有自己的 sort
命令,其行为与通过Cygwin命令行提供的变体不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.