Instalasi C standard Risanuri HIdayat Visual C Toolkit

  • Slides: 10
Download presentation
Instalasi C standard Risanuri HIdayat

Instalasi C standard Risanuri HIdayat

Visual C Toolkit Ú Download dari • http: //msdn. microsoft. com/visualc/vctoolkit 2003/ Ú Nama

Visual C Toolkit Ú Download dari • http: //msdn. microsoft. com/visualc/vctoolkit 2003/ Ú Nama file – VCToolkit. Setup. exe Ú Double click file tersebut untuk meng-install, hasil instalasi terletak di – C: Program FilesMicrosoft Visual C++ Toolkit 2003 Ú Set Path, – untuk Win XP click kanan my computer ->properties, click Advanced, dan environment variables. Tambahkan/Isikan pada variabel Path • C: Program FilesMicrosoft Visual C++ Toolkit 2003bin;

Hello Ú Tuliskan program berikut, text editor terserah anda (Note. Pad, Word. Pad, Jext,

Hello Ú Tuliskan program berikut, text editor terserah anda (Note. Pad, Word. Pad, Jext, dsb) #include <stdio. h> main() { /* My first program */ printf("Hello Sayang…. n"); } Ú Simpan dalam file dengan nama: hello. c

Hello Ú Compile hello. c dengan perintah berikut >cl hello. c -o hello. exe

Hello Ú Compile hello. c dengan perintah berikut >cl hello. c -o hello. exe ÚRun/eksekusi hello. exe >hello. exe Hello Sayang….

Hello Ú D: mychello>cl hello. c -o hello. exe Ú Microsoft (R) 32 -bit

Hello Ú D: mychello>cl hello. c -o hello. exe Ú Microsoft (R) 32 -bit C/C++ Optimizing Compiler Version 13. 10. 3052 for 80 x 86 Ú Copyright (C) Microsoft Corporation 1984 -2002. All rights reserved. Ú hello. c Ú Microsoft (R) Incremental Linker Version 7. 10. 3052 Ú Copyright (C) Microsoft Corporation. All rights reserved. Ú /out: hello. exe Ú hello. obj Ú D: mychello>dir Ú Volume in drive D is DATA Volume Serial Number is 3 FDE-CEE 7 Ú Directory of D: mychello Ú Ú 09/08/2004 09: 32 AM Ú Ú Ú . 09/08/2004 09: 32 AM. . 09/08/2004 09: 33 AM 90 hello. c 09/08/2004 09: 34 AM 646 hello. obj 09/08/2004 09: 34 AM 36, 864 hello. exe 3 File(s) 37, 600 bytes 2 Dir(s) 1, 766, 662, 144 bytes free Ú D: mychello>hello. exe Ú Hello Sayang…. <DIR>

gcc Ú MANDATORY: Must choose one of the following: Ú a. gcc-2. 95. 2

gcc Ú MANDATORY: Must choose one of the following: Ú a. gcc-2. 95. 2 -crtdll. exe. . . . C/C++/F 77/Obj. C compilers (CRTDLL) Ú b. gcc-2. 95. 2 -msvcrt. exe. . . . C/C++/F 77/Obj. C compilers (MSVCRT) Ú Download dari • ftp: //ftp. xraylith. wisc. edu/pub/khan/gnu-win 32/mingw 32/gcc-2. 95. 2/gcc 2. 95. 2 -crtdll. exe • http: //te. ugm. ac. id/~risanuri/download/gcc-2. 95. 2 -crtdll. exe Ú All Win 9 x/NT systems come with CRTDLL, and all Win 9 x/NT systems except perhaps the first edition of Win 9 x systems come with MSVCRT as well. Until now, CRTDLL runtime version was the one commonly known as Mingw 32, and the MSCVCRT was provided as an add-on.

Documentation Ú OPTIONAL: Documentation packages are optional, but I highly recommend it. – mingw

Documentation Ú OPTIONAL: Documentation packages are optional, but I highly recommend it. – mingw 32 -docs-html. exe. . . . Docs in HTML format. Contains GCC 2. 95. 2, Binutils 2. 9. 4, GDB 4. 18 and Make 3. 77 docs.

Installation Ú Just double click the file Ú Decide where to install it. By

Installation Ú Just double click the file Ú Decide where to install it. By default, it usually install in "C: GCC-2. 95. 2", but you can install *anywhere* you want, including on a ZIP/JAZ drive.

Setting up environment variables Ú Setting path berada dalam file MINGW 32. BAT. •

Setting up environment variables Ú Setting path berada dalam file MINGW 32. BAT. • C: > PATH=C: GCC-2. 95. 2BIN; %PATH% Ú Jalankan file ini, atau copykan isi file ini ke dalam autoexec. bat Ú Di Windows XP

Hello Directory of D: mychello>type hello. c #include <stdio. h> main() { /* My

Hello Directory of D: mychello>type hello. c #include <stdio. h> main() { /* My first program */ printf("Hello Sayangà. n"); } D: mychello>gcc hello. c -o hello. exe D: mychello>dir Volume in drive D is DATA Volume Serial Number is 3 FDE-CEE 7 09/08/2004 09: 32 AM <DIR>. . 09/22/2004 11: 34 AM 88 HELLO. BAK 09/22/2004 11: 36 AM 89 HELLO. C 09/22/2004 11: 56 AM 9, 465 a. exe 09/22/2004 11: 57 AM 646 hello. obj 10/02/2004 08: 40 AM 9, 465 hello. exe 5 File(s) 19, 753 bytes 2 Dir(s) 1, 766, 170, 624 bytes free D: mychello>hello. exe Hello Sayangà. D: mychello>