{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

week6 - Unix C GNU HTML Perl Python Libraries Files...

Info icon This preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 1 Libraries & Files Comp-206 : Introduction to Software Systems Week 6 Joseph Vybihal Computer Science McGill University
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 2 Announcements Midterm exam: In Class Friday, October 23 Final Exam December 18 @ 2PM » TA's Sina – ENGTR 3 rd floor T & Th 12:30-13:30 Alex – ENGTR 3 rd floor Mon 10:00-12:00 Mon 13:00-15:00
Image of page 2
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 3 Announcements Midterm next Friday (in class) Monday will talk about it Contents: Lectures weeks 1 to 6 Assignments #1 and #2 I'll post a sample midterm on WEB CT this weekend.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 4 Midterm Exam In class, 60 mins, 3 questions Topics: Unix scripts, command-line & architecture C programming (up to Wed's lecture) Exam focus: Programming Secondary topics: Definitions Problem solving
Image of page 4
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 5 Types of Midterm Questions Write a program in login scripts, general Scripts or/and C. What's wrong with this code? Write the command-line command for... Definitions: shell, Unix, Sessions,... Scope
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 6 Part 1 C’s Standard Libraries
Image of page 6
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 7 About Libraries They are made from 2 files: .h .o (originally .c or .assembler file) The .o files are often merged (like a zip) into a single file called a: .lib, or .dll .lib files are merged into your program .dll files are merged into the OS and called/shared by all programs.
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 8 Linking .lib Files gcc –c file.c file2.c gcc –o outfile file.o file2.c
Image of page 8
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 9 GCC and Libraries Two steps to use libraries Step 1: Compiler needs to know about them C's Standard Library the LIB directory This is default (so nothing to do, automatic) Invoking external libaries through GCC Gcc file.c -l library gcc -I/opt/gdbm/include dbmain.c /opt/gdbm/lib/libgdbm.a Step 2: You need to ask to use them #include <standard c library> or #include “path/external c library”
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Unix C + GNU HTML Perl Python COMP 206 - Joseph Vybihal 2007 Software Systems 10 Many Libraries #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <ctype.h> Many more come standard in C Many more designed special for your compiler Many more can be purchased .h simply refers to a “header” file.
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern