#168040 - semihce - Wed Apr 08, 2009 12:14 am
Hello everybody,
I am developing a C# application that generates gba(C++) files.
What I want to do is compile those C++ files in C# application.
Namely, when the C# application runs, I want to build some C++ files.
Do you think it is possible. If it is possible, how can I do this?
#168041 - Dwedit - Wed Apr 08, 2009 12:23 am
If you can do it from the command line, you can do it from a C# program.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#168042 - semihce - Wed Apr 08, 2009 12:29 am
HOW?
#168043 - Miked0801 - Wed Apr 08, 2009 1:02 am
What exactly is the C# layer adding? What benefit to your GBA code will it give?
#168046 - semihce - Wed Apr 08, 2009 1:43 am
Ok, I've just learned it from MSDN form and i am sharing it here, may be someone need it..
In order to compile a C++ application from outside of the application, one need to write a batch file.
The only thing that batch file must include the calling code of makefile.. This is the batch file that i built my application:
Code: |
make -f makefile clean
make -f makefile |
Save this as name.bat and run it in the directory of C++ application. If one needs to run it from C#, just call this batch file from C#..
#168077 - elyk1212 - Thu Apr 09, 2009 1:34 am
Equally easy is (without any need for a batch file) most languages have a syscall function where you can call any command that is within your environment PATH variable.
Anyhow though, any way you could let us in on what your final goal with having C# call GNU Make would be? Maybe we can give you ideas based on your goal.