i have generated .exe file from C file (ie filename.c ) after compiling in linux machine with -O option. I wish to know about how to run that .exe file when linux system starts up ?
feedback
|
migrated from stackoverflow.com Apr 9 '10 at 3:25
This question came from our site for professional and enthusiast programmers.
|
Compile filename.c under linux and just add the command to /etc/rc.d/rc.local. This would get executed when computer boots. Another way would be to create a script for it in /etc/rc.d/init.d/ and then make links to it in the relevant run levels /etc/rc.d/rc3.d/, /etc/rc.d/rc5.d/ | |||
feedback
|
|
To run exe files on Linux you need Wine. So first you have to start wine, and then your exe. I guess you have to put these into /etc/rc.d/(Choose appropriate run level) | |||||||
feedback
|
I am assuming you are using GCC and you mean '-o' instead of '-O'. In this case you have named the file to be "file.exe", although on Linux you don't need to specify the file extension as "exe". So you have done something like
You can then run the program using
If you would like to have the compiled application run at startup, you will need to put the compiled file in a common location and investigate which startup scripts run for your distribution ( Once you have found how to add a startup script then you can add | |||
|
feedback
|