views:

47

answers:

1

HI,

I would like to run a cygwin compiled program in visual studio using c#

Thanks :)

L

BTW:

            System.Diagnostics.Process MyProcess = new System.Diagnostics.Process();
            MyProcess.StartInfo.UseShellExecute = false;

            MyProcess.StartInfo.FileName = "C:\\cygwin\\Cygwin.bat";
            MyProcess.StartInfo.CreateNoWindow = true;
            MyProcess.Start();

This is the code I've tried so far, I have no idea how to make it run the cygwin compiled program tho (AGFL's EP4IR is the targeted program to run)

Thanks

+1  A: 

Just like any other program. Are you running any concrete well-known program or your own?

Also, see this related question here on StackOverflow: Executing a Cygwin process from .NET

pajton
I am running AGFL http://www.agfl.cs.ru.nl/EP4IR/english.html
Lily
Ok, are you getting any errors when invoking it just like any other program?
pajton
So far I've just run the cygwin, I don't know how to call the program from the cygwin screen. I'll insert code in my question
Lily
Do not run the `cygwin`. Run the program you want! I.e. do not run `cygwin.exe someprogram.exe` instead run `someprogram.exe`. Then, please post any errors you encounter
pajton
but it only runs in cygwin
Lily
What happend when you change the `FileName` in your sample code to the executable you want to run?
pajton