[share] Compile C# dengan Terminal

Aplikasi-aplikasi diubuntu: • Aplikasi Grafis •
Aplikasi Internet •
Aplikasi Office •
Aplikasi Sound & Video •
Aplikasi Programming
Post Reply
User avatar
SaGa
Posts: 188
Joined: 19 Jan 2010, 09:09
Location: Banyuwangi
Contact:

[share] Compile C# dengan Terminal

Post by SaGa » 31 Mar 2011, 20:38

Nyoba2 dan pengen share sedikit tentang cara ngompile syntax C# di Ubuntu
Syarat dan bahan :
1. Laptop/Komputer dengan OS Ubuntu
2. terinstall MonoDevelop. Kalo belum terintas jalanin perintah ni

$sudo apt-get install monodevelop

3. kalo udah ada langsung buat project baru..
contoh syntax sederhananya seperti ini..
public static void Main (string[] args)
{
int a;
int b;
int hasil;

Console.Write("inputan pertama : ");
a=Convert.ToInt32(Console.ReadLine());
Console.Write("inputan kedua : ");
b=Convert.ToInt32(Console.ReadLine());

hasil=a*b;
Console.WriteLine("hasil = "+hasil);
}
4. Kalo udah jadi jangan lupa di run [F5] untuk mengetahui ada error apa tidak
5. Buka terminal dan masuk ke directory kita menyimpan project tadi
6. Ketik perintah berikut

$gcms Main.cs

perintah itu untuk membuild project kita.

7. Setelah itu akn muncul file dengan nama Main.exe, kemudian ketik perintah

$mono Main.exe

Image

selamat mencoba..
sumber : My Blog


User avatar
barracuda
Posts: 4
Joined: 04 Apr 2011, 19:41
Location: Jakarta

Post by barracuda » 05 Apr 2011, 23:25

wew keren gan
ini ni yg ane cari2 :D


User avatar
SaGa
Posts: 188
Joined: 19 Jan 2010, 09:09
Location: Banyuwangi
Contact:

Post by SaGa » 06 Apr 2011, 14:18

monggo2 gan, sharing juga lok udah nyoba...


User avatar
masterbetawie
Posts: 7
Joined: 13 Feb 2011, 21:38
Location: bekasi
Contact:

Post by masterbetawie » 07 Apr 2011, 19:38

makasih om trick na...
working bgt buat ane yg newbie


User avatar
SaGa
Posts: 188
Joined: 19 Jan 2010, 09:09
Location: Banyuwangi
Contact:

Post by SaGa » 08 Apr 2011, 21:58

masterbetawie wrote:makasih om trick na...
working bgt buat ane yg newbie
:)
sharing juga bro program yang dah dibuat....


User avatar
zerocode
Posts: 97
Joined: 22 Jun 2010, 19:25
Location: Pekanbaru,Riau,INDONESIA,BUMI

Post by zerocode » 09 Apr 2011, 01:24

kalo buat vb.netnya gimana om!


User avatar
SaGa
Posts: 188
Joined: 19 Jan 2010, 09:09
Location: Banyuwangi
Contact:

Post by SaGa » 10 Apr 2011, 07:46

zerocode wrote:kalo buat vb.netnya gimana om!
wah ane belum pernah nyobain yang vb.net bro...
:grin:


User avatar
anak_ingusan
Posts: 74
Joined: 03 Dec 2010, 14:22
Location: bali
Contact:

Post by anak_ingusan » 15 Apr 2011, 19:27

mantep


User avatar
narsh4
Posts: 3
Joined: 02 Oct 2011, 13:01
Location: banyuwangi,indonesia

Post by narsh4 » 17 Oct 2012, 22:19

sayacoba kog begini ya...
root@# gcms Main.cs
No command 'gcms' found, did you mean:
Command 'acms' from package 'acm4' (universe)
Command 'gmcs' from package 'mono-gmcs' (main)
gcms: command not found

kenapaya...?
saya gunain 12.04 ....
:D


User avatar
narsh4
Posts: 3
Joined: 02 Oct 2011, 13:01
Location: banyuwangi,indonesia

Post by narsh4 » 17 Oct 2012, 22:38

ohh ternyata saya sudah bisa mas saga...
thanks sebelumnya...
maap ngerepotin


User avatar
belthsazar
Posts: 1300
Joined: 02 Jul 2011, 04:38
Location: Surabaya, Indonesia

Post by belthsazar » 19 Oct 2012, 23:27

saya gak mudeng. cuma bisa make C. hahaha..


User avatar
jihad_ilmu
Posts: 3
Joined: 30 Oct 2012, 11:27

Post by jihad_ilmu » 31 Oct 2012, 21:57

langsung dari terminal juga bisa gan.
contoh kita nyimpen di folder Desktop dengan nama file.c
masuk ke Desktop

$cd /home/user/Desktop

kemudian rubah menjadi gcc

$gcc file.c -o file

kemudian eksekusi dengan perintah

$./file

selesai.

ndak perlu install toolsnya gan.

salam satu jari gan


Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests