Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 21994

Execute .c file to generate .exe from c# Form Application

$
0
0

I'm trying to use gcc compiler to get Output exe file. When I perform this from file explorer and cmd manually it work as expected but through Code no output is generated. I'm new to this C# and any help would be really appreciated.

Process process = new Process()      
    ProcessStartInfo startInfo = new ProcessStartInfo();
                process.StartInfo.WorkingDirectory = @"C:\Users\abc\Documents\Visual Studio 2017\Projects\CodeJam_FormApplication\CodeJam_FormApplication";
                startInfo.WindowStyle = ProcessWindowStyle.Hidden;
                startInfo.FileName = "cmd.exe";
                startInfo.Arguments = "/C gcc Test.c -o Output.exe";
                process.StartInfo = startInfo;
                process.Start();

Viewing all articles
Browse latest Browse all 21994

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>