1 / 13

OS Homework #2

OS Homework #2. How to finish it ?. Compile. GNU C Compiler (GCC) Please use gcc file .c -o file -o option specify execute file instead of a.out For C++? g++. Compile. Compile one file and exe gcc hello.c -o hello ./hello Compile multiple files gcc main.c fn_hello.c -o newhello.

mason-weber
Télécharger la présentation

OS Homework #2

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. OS Homework #2 How to finish it ?

  2. Compile • GNU C Compiler (GCC) • Please use gcc file.c -o file • -o option specify execute file instead of a.out • For C++? g++

  3. Compile • Compile one file and exe • gcc hello.c -o hello • ./hello • Compile multiple files • gcc main.c fn_hello.c -o newhello

  4. Compile • Creating object files • Use –c option • gcc -c main.c • gcc -c fn_hello.c • gcc main.o fn_hello.o -o hello • Link Order?

  5. Makefile

  6. Makefile example

  7. Makefile • dependency

  8. Debug • Warning? • Segmentation Fault? • DDD (Data Display Debugger) • GDB (GNU Debugger)

  9. Homework • 1. producer-consumer • 2. fibonacci • 3. fibonacci using share memory • 4. simple popen • 5. mini-mini shell (optional)

  10. Resource • Please see http://www.cmlab.csie.ntu.edu.tw/~xdd/OS07/resources.html

  11. Q&A

  12. Thank You

More Related