using VIX api I want to copy a C file into the guest and compile it and run it.
the problem is with compiling the C program. Here we need to supply the full path of gcc. but I full path might not be always known.
So, how to run "which gcc" in the guest than use the result to compile it?
Thanks in advance.
-Arindam
Do mean to upload a source file and a script to compile it?
in this case, using bash it could be something like this
----
#!/bin/bash
gcc=$(which gcc)
$gcc source.c -o program
----
what if without script.
char *command;
where the command string will store the "which gcc".
-Arindam