我用C#调用tcc编译器编译C语言源程序,程序执行过程中没错误,但没有exe文件生成,不知道为何。在dos窗口下可以正常编译成exe文件。
C#调用代码如下:            Process process = new Process();            process.StartInfo.FileName = Application.StartupPath + "\\tc\\tcc.exe" ;
            process.StartInfo.Arguments ="-Iinclude -Llib "+  Application.StartupPath + "\\tc\\Hello.c";            process.StartInfo.UseShellExecute = false;
            process.StartInfo.CreateNoWindow = false;
            process.Start();请高手指教!

解决方案 »

  1.   

    跟踪看看,看tcc.exe和hello.c位置是否正确。
      

  2.   

    能生成obj文件,没有生成exe文件。在dos窗口下就可以,不知道何故啊?
      

  3.   


    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 = Application.StartupPath + "\\tc";
                p.Start();
                p.StandardInput.WriteLine( "tcc -Iinclude -Llib Hello.c");