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/
Wie führt man die EXE-Datei aus, wenn das Linux-System startet?
Ich habe eine .exe-Datei aus der C-Datei (dh Dateiname.c) nach dem Kompilieren in Linux-Maschine mit der Option -O generiert. Ich möchte wissen, wie die EXE-Datei ausgeführt wird, wenn das Linux-System gestartet wird?
3 Antworten auf die Frage
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)
Hi, i have generated .exe file from C file (ie filename.c ) after compiling in linux machine with -O option
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
gcc filename.c -o file.exe
You can then run the program using
./file.exe
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 (init.rc
). You may find this helpful.
Once you have found how to add a startup script then you can add /var/myapp/test.exe
to an existing startup script or write your own.
Verwandte Probleme
-
9
Was ist der Unterschied zwischen den Befehlen "su -s" und "sudo -s"?
-
4
Gutes freies Ubuntu Server-VMWare-Image benötigt
-
4
Was sind die Unterschiede zwischen den großen Linux-Distributionen? Werde ich es merken
-
2
Begrenzung der CPU-Auslastung für Flash in Firefox?
-
2
Wie kann ich mein Mikrofon unter Debian GNOME zum Laufen bringen?
-
2
Conky-Setups - Beispiele / Ideen?
-
3
Was sind die Unterschiede zwischen Linux Window Managern?
-
2
ThunderBird / Lichtsynchronisation mit SE k770i
-
4
Linux-Dateisystem
-
6
Vollbild-Flash langsam in KDE 4