C#调用TCC编译器问题
发布网友
发布时间:2022-12-23 21:05
我来回答
共1个回答
热心网友
时间:2023-10-03 09:20
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = false ;
p.StartInfo.Arguments = "/c" + "command";
p.StartInfo.WorkingDirectory = "D:\\\\Win-TC\\\\bin\\\\20cn";
p.Start();
p.StandardInput.WriteLine( "tcc 2.c");