knobby67
31st July 2014, 11:59
Hi All,
I'm using Qt to call various makefiles on my Linux Ubuntu system just to automate some projects. From my reading I think I need to use process start but for some reason I can't get it to work. I know my paths ect are correct because I can use system to get make to work on a program. So in a folder I have a number of makes, SimMakefile, ArmMakefile, Linuxmakefile. Which I normally get to compile via terminal using for example "make -f SimMakefile"
So in Qt I tried
/*lets compile a game*/
directory.setCurrent( "/home/tony/Dropbox/Development/Projects/Games/TankBattle" );
/*just to test*/
QDir output;
QString newpath = output.currentPath( );
game_path = "make -f SimMakefile" ;
process.start( game_path );
however if I replace process start and setcurrent with linux system calls it works.
system("cd /home/tony/Dropbox/Development/Projects/Games/TankBattle");
system("make -f SimMakefile");
I've tried make as /usr/bin/make with no luck.
Can anyone advise how I should do this in Qt rather than use system calls.
Thanks
I'm using Qt to call various makefiles on my Linux Ubuntu system just to automate some projects. From my reading I think I need to use process start but for some reason I can't get it to work. I know my paths ect are correct because I can use system to get make to work on a program. So in a folder I have a number of makes, SimMakefile, ArmMakefile, Linuxmakefile. Which I normally get to compile via terminal using for example "make -f SimMakefile"
So in Qt I tried
/*lets compile a game*/
directory.setCurrent( "/home/tony/Dropbox/Development/Projects/Games/TankBattle" );
/*just to test*/
QDir output;
QString newpath = output.currentPath( );
game_path = "make -f SimMakefile" ;
process.start( game_path );
however if I replace process start and setcurrent with linux system calls it works.
system("cd /home/tony/Dropbox/Development/Projects/Games/TankBattle");
system("make -f SimMakefile");
I've tried make as /usr/bin/make with no luck.
Can anyone advise how I should do this in Qt rather than use system calls.
Thanks