ကၽြန္ေတာ္တို႔ ဆီမွာ C++ program ေတြေရးဖို႔အတြက္ Microsoft ရဲ႕ Visual C++ 2005 Express Edition ကို သံုးၾကတယ္။ Visual C++ 2005 က အရင္တုန္းက VC 6.0 ထက္စာ ရင္ အမ်ားႀကီး ပိုၿပီး တိုးတက္တဲ့ compiler အသစ္ လည္းျဖစ္တယ္။ .NET ရဲ႕ အေျခခံျဖစ္တဲ့ CLR (Common Language Runtime) နဲ႔ ကိုက္ညီမႈရိွတဲ့ program ေတြကိုလည္း ဖန္တီးလို႔ ရတယ္ေလ။
Professional edition ကို မသံုးပဲနဲ႔ အမ်ားစုက Express edition ကို ဘာလို႔ သံုးၾကသလည္း ဆိုတာေတာ့ ရွင္းပါတယ္။ Express edition က အလကားရတဲ့ free version ျဖစ္ တာကိုး။ Microsoft web site ကေန free download လုပ္ယူလို႔ ရတယ္ေလ။ Beginner ေတြ၊ student ေတြနဲ႔ ၀ါသနာအေလွ်ာက္ programming ကို ေလ့လာတဲ့ သူေတြအတြက္ အလကား download လုပ္ ယူခြင့္ ေပးထားတဲ့ အမ်ိဳးအစားပါ။
အဲ Express edition မွာ မေကာင္းတာက သမားရိုးက် pure Win32 program ေတြကို ဖန္တီးခြင့္ မေပးတာပါပဲ။ ဆိုလိုတာက ကၽြန္ေတာ္တို႔ အရင္တုန္းက ေရးေနက်ျဖစ္တဲ့ Win32 program ေတြကို ဖန္တီးႏိုင္ဖို႔အတြက္ library နဲ႔ support file ေတြ ပါမလာေတာ့ပါဘူး။
Professional edition ကို မသံုးပဲနဲ႔ အမ်ားစုက Express edition ကို ဘာလို႔ သံုးၾကသလည္း ဆိုတာေတာ့ ရွင္းပါတယ္။ Express edition က အလကားရတဲ့ free version ျဖစ္ တာကိုး။ Microsoft web site ကေန free download လုပ္ယူလို႔ ရတယ္ေလ။ Beginner ေတြ၊ student ေတြနဲ႔ ၀ါသနာအေလွ်ာက္ programming ကို ေလ့လာတဲ့ သူေတြအတြက္ အလကား download လုပ္ ယူခြင့္ ေပးထားတဲ့ အမ်ိဳးအစားပါ။
အဲ Express edition မွာ မေကာင္းတာက သမားရိုးက် pure Win32 program ေတြကို ဖန္တီးခြင့္ မေပးတာပါပဲ။ ဆိုလိုတာက ကၽြန္ေတာ္တို႔ အရင္တုန္းက ေရးေနက်ျဖစ္တဲ့ Win32 program ေတြကို ဖန္တီးႏိုင္ဖို႔အတြက္ library နဲ႔ support file ေတြ ပါမလာေတာ့ပါဘူး။
ဒီေတာ့ Visual C++ 2005 Express ကုိ သံုးၿပီးေတာ့ Win32 application ေတြကို ဖန္တီး ဖို႔အတြက္ Microsoft ကေနပဲ အခမဲ့ ေပးထားတဲ့ Microsoft Platform SDK ကို download လုပ္ယူၿပီး install လုပ္ဖို႔ လိုပါတယ္။ အဲဒီ Platform SDK ကို install လုပ္ လိုက္မွသာ Visual C++ 2005 Express Edition ကို သံုးၿပီးေတာ့ သမားရိုးက် Win32 program ေတြကို ဖန္တီးလို႔ ရၾကမွာပါ။ Win32 program ေတြ ေရးဖို႔ ဘာလို႔ ဒီေလာက္ အေရးတယူ လုပ္ေနရ သလည္း ဆိုေတာ့ မ်ားေသာအားျဖင့္ game program ေတြ၊ DirectX ဒါမွမဟုတ္ OpenGL လုိမ်ိဳး API ေတြကို သံုးၿပီးေတာ့ graphic rendering program ေတြကို ဖန္တီးမယ္ဆုိရင္ Win32 format နဲ႔ေရးတာ ပိုၿပီး အဆင္ေျပတယ္ေလ။ NTU မွာ အခုထိ Windows XP နဲ႔ Visual C++ 6.0 ကို သံုးေနၾကတုန္းပဲ ဆိုရင္ ယံုမလား။
Visual C++ 2005 Express မွာ Win32 application ေတြကို ေရးဖို႔အတြက္ ပထမဆံုး VC++ 2005 Express ကို download လုပ္ၿပီး install လုပ္ပါ။ ၿပီးရင္ Microsoft Platform SDK ကိုိ download လုပ္ၿပီး install လုပ္ပါ။ Platform SDK ကိုေရြးတဲ့ ေနရာမွာ ဘယ္ Windows အတြက္ ဆိုတာ အေရးမႀကီးပါဘူး။ ဥပမာ- Platform SDK for Windows Server 2003 ကိုလည္း Windows XP ေပၚမွာ install လုပ္လို႔ ရပါတယ္။ ျပႆနာ မရိွပါဘူး။ အဆင္ေျပတာ ကိုသာ ေရြးၿပီး download လုပ္ပါ။ Latest ျဖစ္ရင္ေတာ့ ပိုေကာင္းတာေပါ့။
တစ္ခုရိွတာက Latest ျဖစ္တဲ့ Platform SDK ကို Microsoft Web Site ကေန download သြားလုပ္မယ္ ဆိုရင္ ခင္ဗ်ား စက္ထဲမွာ ထည့္ထားတဲ့ Windows OS ကို original version ဟုတ္ မဟုတ္ စစ္ပါလိမ့္မယ္။ အဲဒါကို ေရွာင္ခ်င္ရင္ Latest မဟုတ္တဲ့ တစ္ျခား version ကို ရွာၾကည့္ပါ။ အဲဒါေတြက စစ္တာ၊ ေဆးတာ လုပ္ေလ့ မရိွပါဘူး။ ဒါမွမဟုတ္ ေအာက္မွာ ေပးထားတဲ့ Web link ကေနလည္း Platform SDK SP1 ကို အစစ္အေဆး မရိွ Free download လုပ္လို႔ ရပါတယ္။
VC++ 2005 ကိုလည္း install လုပ္ၿပီးၿပီ။ Platform SDK ကိုလည္း ထည့္ၿပီးၿပီ ဆိုရင္ Visual C++ 2005 E
ၿပီးရင္ ေနာက္ဆံုး တစ္ခု လုပ္ဖို႔ က်န္ေသးတယ္ဗ်။ မဟုတ္ရင္ compile လုပ္လို႔ရေပမယ့္ run time မွာ ျပႆနာ တက္လိမ့္မယ္။ Visual C++ 2005 Express ကို install လုပ္ထားတဲ့ folder ေအာက္မွာ corewin_express.vsprops ဆိုတဲ့ file ေလးကို ရွာလိုက္ပါ။ (Windows Search option ကိုသံုးၿပီး ရွာေပါ့)။ အဲဒီ file ေလးထဲမွာ AdditionalDependencies="kernel32.lib" ဆိုတဲ့ စာေၾကာင္း ေလးကို ေတြ႕ေအာင္ ရွာပါ။ ၿပီးရင္ ေအာက္မွာ ျပထားသလို ျပင္လိုက္ပါ။
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
ျပင္ၿပီးရင္ save လုပ္လိုက္ပါ။ ဒါဆိုရင္ ကၽြန္ေတာ္တို႔ Visual C++ 2005 Express Edition ကို သံုးၿပီးေတာ့ Pure Win32 application ေတြကို စိတ္ႀကိဳက္ ဖန္တီးယူလို႔ ရပါၿပီ။ Visual C++ 2005 က ကၽြန္ေတာ့အျမင့္ေတာ့ သံုးရတာ ေပါ့ၿပီး၊ ျမန္လည္း ျမန္တယ္ ထင္တာပဲေလ။

0 comments:
Post a Comment