So I am trying to call a program from within a c file I am making but the only way I've been able to do that is by using the system() function which causes error on its own. To run the program in terminal I use;
~/odas/bin/odaslive -vc ~/odas/config/odaslive/matrix_creator.cfg
This is what I am currently trying to use to run that same program, it compiles and will run in terminal but nothing happens.
pid_t pid=fork();
if (pid==0){
//static char *argv[] ={"echo","-vc ~/odas/config/odaslive/matrix_creator.cfg", NULL};
execl("~/odas/bin", "~/odas/bin/odaslive", "-vc", "~/odas/config/odaslive/matrix_creator.cfg", (char *)NULL);
exit(127);
} else {
waitpid(pid,0,0);
}