954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Process.Start problem

Hi. I'm making small application what will do c++ programs compiling easier. I have this code:

System.Diagnostics.Process.Start("C:\\Alps\\compiler\\H-i586-cygwin32\\bin\\g++.exe", "-c Main.cpp -o main.o ");

This code should start

g++.exe


with arguments

-c Main.cpp -o main.o


for compiling main cpp file to o file. Can you see any error in my code? Why it does not works? When I will click to button what contains this code, nothing happens. Main.cpp file is there and g++.exe too. Path is good.

©lick
Newbie Poster
4 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

You have to specify the path of source and object file.

string app = @"C:\Alps\compiler\H-i586-cygwin32\bin\g++.exe";
 string cppFile = @"-c c:\app\Main.cpp";
 string outFile = @"-o c:\app\main.o";

 System.Diagnostics.Process.Start(app, cppFile + " " + outFile);
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

Still does not works...

©lick
Newbie Poster
4 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: