1 / 19

Practicing compiling C

Practicing compiling C. CS 210 Tutorial 9 Studwww.cs.auckland.ac.nz/ ~mngu012/public.html/210/9/. You try to do it yourself following the tutorial below A good link for C tutorial: http://gd.tuwien.ac.at/languages/c/programming-dmarshall/ Small interesting C code examples

Download Presentation

Practicing compiling C

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Practicing compiling C CS 210 Tutorial 9 Studwww.cs.auckland.ac.nz/ ~mngu012/public.html/210/9/

  2. You try to do it yourself following the tutorial below • A good link for C tutorial: • http://gd.tuwien.ac.at/languages/c/programming-dmarshall/ • Small interesting C code examples • http://gd.tuwien.ac.at/languages/c/programming-dmarshall/chapter2_22.html • Recommended!!!

  3. At least 3 ways to compile C • Using gcc in chaos.cs.auckland.ac.nz • Using gcc in Cygwin • Using visual studio • Other compiler: http://www.thefreecountry.com/compilers/cpp.shtml

  4. Chaos.cs.auckland.ac.nz • SHH connection: Putty, SSH • Putty: • http://www.putty.nl/download.html • SSH: • Mirror.cs.auckland.ac.nz ?

  5. Run Putty

  6. Run Putty

  7. Run Putty

  8. Run Putty • After log on, putty will put you inside UNIXHOME folder • You can go to your G drive by typing “cd ..” • Type “man gcc” for manuals of GCC

  9. Man gcc – Ctrl+C to exit

  10. Compile C code in chaos • Compile • Gcc –o filename.exe filename.c • Run: • ./ filename.exe arg1 arg2 arg3

  11. Compile C on Cygwin • Document on Cygwin • http://www.cs.auckland.ac.nz/~bruce-h/resources/cygwin/ • Download from http://mirror.cs.auckland.ac.nz

  12. Cygwin to run gcc • Help on how to make cygwin run with gcc • /tutorial8/cygwin.htm • Everything else just the same as Unix chaos.cs.auckland.ac.nz

  13. Compile C in Visual Studio

  14. Compile C in Visual Studio

  15. Compile C in Visual Studio

  16. Compile C in Visual Studio

  17. Compile C in Visual Studio

  18. Compile C in Visual Studio

  19. Compile C in Visual Studio

More Related