Professional Documents
Culture Documents
.HCM
I. Cygwin
1. Ci t Cygwin
Sinh vin download file setup.exe trong Modules hoc cng c th download file ny t trang http://cygwin.com/install.html. Chy file setup.exe, chn Next. Sau chn Install from Local Directory v chn Next.
TR
.HCM
Tip theo, ta download source ca Cygwin v t a ch http://www.mediafire.com/?x4r6svhub97wxrv hoc tham kho thm mt s mirrors khc trong Modules. Sau khi download v v gii nn ta s c mt th mc c tn l CygwinSources. Tr li vi vic ci t Cygwin, ta s chn Browse ch n ng dn th mc ny.
Tip theo, chn nhng gi cn thit ci t. Danh sch cc gi cn ci t: STT T kha Tn gi Phin bn Ghi ch binutils: The GNU assembler, 1 binutils 2.20.51-2 linker and binary utilities Trong Category 2 gcc gcc: C compiler upgrade helper 3.4.4-999 Devel 3 gcc-core gcc-core: C compiler 3.4.4-999 4 gcc-g++ gcc-g++: C++ compiler 3.4.4-999 gcc-mingw-core: Mingw32 200505225 gcc-mingw-core support headers and libraries for 1 GCC gcc-mingw-g++: Mingw32 200505226 gcc-mingw-g++ support headers and libraries for 1 GCC C++ make: The GNU version of the Trong Category 7 make 3.81-2 make utility Devel Trong Category 8 gdb gdb: The GNU debugger 6.8-2 Devel Mun chn mt gi ci t, ta nhp t kha vo khung search. Sau , ta s tm ng gi cn ci t. V ct th 3 (New), ta click chut vo t Skip chn ng phin bn. Lp li thao tc ny cho 8 gi ri chn Next bt u ci t chng trnh.
TR
.HCM
2. Cu hnh Cygwin
Sau khi ci t Cygwin xong: Windows XP: click phi vo My Computer => Properties hoc chn start => Control Panel => System. Sau , chn Advanced => Environment Variables. Trong khung System variables, chn New. Windows 7: click phi vo My Computer => Properties hoc chn start => Control Panel => System. Sau , chn Advanced system settings => Environment Variables Trong khung System variables, chn New.
TR
.HCM
Nhp vo khung Variable name: CYGWIN_HOME v khung Variable value: C:\cygwin (nu ci t cygwin ni khc th cn cp nht li ng dn ny). Chn OK
Trong khung Variable value, di chuyn du nhy xung cui v nhp vo ;%CYGWIN_HOME%\bin;%CYGWIN_HOME%\usr\bin;%CYGWIN_HOME %\usr\local\bin;%CYGWIN_HOME%\lib;%CYGWIN_HOME%\usr\lib
TR
.HCM
Th mc lm vic s l /home/Administrator (lu : Linux phn bit ch hoa v thng, k c lnh v tn tp tin, th mc). Th mc lm vic ny s tng ng vi th mc "C:\cygwin\home\Administrator". Do , trong cygwin thy c mt tp tin no ta phi chp chng vo th mc lm vic. Gi s chp tp tin Main.cpp cn bin dch vo th mc "C:\cygwin\home\Administrator". Sau khi chp file, trong cygwin, g lnh: ls lit k cc tp tin th s thy file Main.cpp
TR
.HCM
cp sourcr dest sao chp file man command-name xem tr gip ca mt lnh exit thot
II. Eclipse
1. Ci t JDK
chy c Eclipse, sinh vin cn ci t JDK trc. Phin bn download l JDK 6 Update 24. Sinh vin c th download file ny trong Modules. Sau khi download v, sinh vin ci t theo cc cu hnh mc nh ca JDK.
2. Ci t Eclipse
Sinh vin thng nht s dng phin bn Eclipse CPP Helios SR2 Win32. Sinh vin c th download Eclipse trong Modules hoc download Eclipse t a ch http://mirror-fpttelecom.fpt.net/eclipse/technology/epp/downloads/release/helios/SR2/eclipse-cpp-heliosSR2-win32.zip Sau khi download xong, c file eclipse-cpp-helios-SR2-win32.zip v gii nn file ny ta c th mc eclipse. Chy file eclipse.exe Tip theo, chn th mc cha source code. Sau , chn Workbench bt u. Trn thanh cng c, chn Window => Preferences => C/C++ => Build => Environment => Select
TR
.HCM
3. To C++ Project
Chn File => New => C++ Project. Trong phn Project name t tn l HelloWorld. Trong Executable chn Hello World C++ Project. Trong Toolchains chn Cygwin GCC. Sau chn Next.
TR
.HCM
Tip theo nhp tn sinh vin vo mc Author v chn Next ri chn Finish. chy chng trnh, click phi vo th mc HelloWorld (bn tay tri) => Run As => 1 Local C/C++ Application. Kt qu s hin th trong khung Console.
PH LC
Ngoi Eclipse ra, sinh vin cng c th chn cho mnh mt IDE khc lp trnh C++. Tuy nhin, sinh vin bt buc phi bin dch bi lm ca mnh chy c trn Cygwin m bo bi lm l hp l. Mi trng hp khng bin dch bi trn Cygwin kim tra trc khi submit, nu c sai st g xy ra s khng c gii quyt. Mt s IDE sinh vin c th tham kho: Visual studio 6, C free, Dev-C++.
-- HT --