Source code ေတြကို
vim မွာေရးၿပီး Terminal မွာပဲ တခါတည္း compile & execute လုပ္တာက GUI အားသန္သူမ်ားအတြက္ မကိုက္လွပါဘူး။ စတင္သူမ်ားက
gedit နဲ႔လုပ္ခ်င္မွာပဲေလ၊ လြယ္လဲ လြယ္ကူပါတယ္။
gedit ဟာ တကယ္႔ကို powerful text editor ျဖစ္တဲ႔အျပင္ သူ႔ရဲ႕ plugin ေတြသံုးၿပီး simple program ေလးေတြကိုပါ ေလ႔လာလို႔ရတဲ႔ powerful tool တစ္ခုျဖစ္ပါတယ္။ ဥပမာ
C++ ကိုစတင္ေလ႔လာလိုသူမ်ားအတြက္
gedit ကိုသံုးၿပီး C++ source file ကို ဘယ္လို compile လုပ္ၿပီး execute လုပ္တယ္ဆိုတာ တင္ျပေပးမွာပါ။
အရင္ဦးဆံုး gedit plugin ျဖစ္တဲ႔ External Tools ကို Activate လုပ္ရေအာင္ ..
gedit ကိုဖြင္႔ပါ ..
Edit > Preferences ကို သြားပါ .. gedit Preferences Window ေလးေပၚလာ မယ္ .. Plugins Tab ကို ဆက္သြားမယ္ .. အဲဒီမွာ External Tools plugin ကို check box မွာ mark လုပ္ေပးၿပီး Activate လုပ္ေပးပါ [see:fig-1] ..
[caption id="attachment_122" align="alignnone" width="480" caption="Figure 1"]

[/caption]
ၿပီးရင္
gedit > Tools > External Tools ကိုဖြင္႔ပါ .. External Tools Manager Window [see:fig.3] ေလးေပၚလာမယ္ .. အဲဒီမွာ Tools အသစ္ႏွစ္ခုကို New buttom ေလးသံုးၿပီးေတာ႔ ထည့္ေပးရေအာင္ .. ပထမတစ္ခုကို "
Compile C++" ႏွင္႔ ေနာက္တစ္ခုကိုက်ေတာ႔ "
Run C++" လို႔နာမည္ေပးရေအာင္ .. ဒါေပမယ္႔ အဆင္ေျပသလို နာမည္ေပးႏိုင္ပါတယ္ .. အဓိကကေတာ႔ ကိုယ္သိဖို႔ပါပဲ [see:fig-2] ..
[caption id="attachment_123" align="alignnone" width="480" caption="Figure 2"]

[/caption]
Compile C++ အတြက္ျဖည့္ရမယ္႔ ဟာေတြကေတာ႔ ..
Description: Compile C++ by using g++
Accelerator: F5
Command(s):
g++ $GEDIT_CURRENT_DOCUMENT_NAME -o ${GEDIT_CURRENT_DOCUMENT_NAME%.*}Input: Nothing
Output: Insert in output panel
Applicability: All documents
Run C++ အတြက္ျဖည့္ရမွာကေတာ႔ ..
Description: Run C++
Accelerator: F6
Command(s):
./${GEDIT_CURRENT_DOCUMENT_NAME%.*}Input: Nothing
Output: Insert in output panel
Applicability: All documents
အဲလိုျဖည့္ေပးလိုက္တဲ႔အတြက္
gedit မွာ C++ source code ကို view ၾကည့္ရာကေန F5 ႏွိပ္ေပးလိုက္ရင္
g++ က အဲဒီ source file ကို compile လုပ္ေပးၿပီး F6 ကို ႏွိပ္လိုက္ရင္ shell က execute လုပ္ေပးပါလိမ္႔မယ္။ ဒါမွမဟုတ္လဲ
gedit > Tools ကိုသြားၿပီး dropdown menu ကေန
Compile C++ နဲ႔
Run C++ တို႔ကို သံုးႏိုင္ပါတယ္။
Compiling C++ souce file[caption id="attachment_124" align="alignnone" width="480" caption="Figure 3"]

[/caption]
Executing C++ program[caption id="attachment_125" align="alignnone" width="480" caption="Figure 4"]

[/caption]
အကယ္၍ Terminal ထဲမွာပဲ compile && execute လုပ္ခ်င္လ်င္ေတာ႔ ..
$ g++ -o Sample Sample.cpp$ ./SampleSample ဆိုတာက compile လုပ္ၿပီးရလာမယ္႔
output file (program) ပါ၊ Sample.cpp ကေတာ႔
input file (c++ source file) ပါ။ စတင္မယ္႔သူမ်ား အစျပဳႏိုင္ၿပီလို႔ ေမွ်ာ္လင္႔ပါတယ္ .. :-)