SEEM3460 Tutorial Multi-module programming in C. Copy the material Create the directory mkdir c_multi cd c_multi mkdir ask cd ask Copy files cp ~seem3460/distribute/c_multi-module/ask/ask_reverse.c.

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

Introduction to the Omega Server CSE Overview Intro to Omega Basic Unix Command Files Directories Printing C and C++ compilers GNU Debugger.
CSE1222: Unix IntroThe Ohio State University1. Common Directory Commands  lsList directory contents  cd {dir}Change working directory to {dir}  pwdPrint.
ENEE150: Discussion 1 Section 0104 Please Sit Down at a Computer and Login!
C Programming Tools Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users” Third Edition,
1 Introduction to UNIX 2 Ke Liu
Ar: Unix Archiver Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users” Third Edition, Prentice-Hall,
CS 110 Intro to Computer Science I Sami Rollins Fall 2006.
Basic linux shell commands and Makefiles. Log on to engsoft.rutgers.edu Open SSH Secure Shell – Quick Connect Hostname: engsoft.rutgers.edu Username/password:
Object Linking and Embedding A tool which allows different software application packages to share data.
CSCI S-1 Section 3. Deadlines for Homework 2 Problems 1-8 in Parts C and D – Friday, July 3, 17:00 EST Parts E and F – Tuesday, July 7, 17:00 EST.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
The Unix Environment and Compiling. Getting Set Up Your programs will be compiled and tested on the Departmental server ‘linprog’ The linprog servers.
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Operating Systems Lecture 5. Agenda for Today Review of previous lecture Browsing UNIX/Linux directory structure Useful UNIX/Linux commands Process concept.
QT - a C++ based GUI QT’s Designer and Assistant.
Copyright (c) by CNAPTICS Corporation. All rights reserved.1 INFO Oracle Database 11g: Administration II Presented By: Marc S. Paller,
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
Vim Editor and Unix Command gcc compiler Computer Networks.
Lecture 0 CIS 208 C Language Lab Wed. January 12, 2005.
1 Editing a C Program 01/16/15. 2 Objective Use Linux to edit, compile and execute a C program.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
SEEM3460 Tutorial Tips on Using UNIX. Keyboard shortcuts General Copy: Ctrl+Insert (not Ctrl+c) Cut: Shift+Del (not Ctrl+x) Paste: Shift+Insert (not Ctrl+v)
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
CGS 3460 Why we choose UNIX n Powerful lMulti-user operating system lGood programming tools Most heavy-duty database management systems started out on.
Executing a C Program Creating the Program Compilation Linking Execution.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Chapter 12 C Programming Tools Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, Original Notes.
Geant Simulation Tutorial 2002 년 6 월 26 일 2002 CHEP 여름학교 서울대학교 김복주 웹페이지 :
Intro. To Unix commands For those who’ve never used Unix before Quick tutorial to let you move around your Unix Accounts No discussion of inner workings.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
Make: File Dependency System Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users” Third.
cs33201 Chapter 12 C Programming Tools Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, 2003.
ENEE150: Discussion 1 Section 0104/0105 Please Sit Down at a Computer and Login!
Makefiles1 MAKEFILES Purpose: contain UNIX commands and will run them in a specified sequence. Syntax Definition : { Section-name: {unix command #1} …
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  There are many different.
ICE UNIX TUTORIAL. File System Commands cd – change directory cd – change directory ls – list contents ls – list contents rm – remove/delete rm – remove/delete.
C Programming Lecture 3 : C Introduction 1 Lecture notes : courtesy of Woo Kyun and Chang Byung-Mo.
C 프로그래밍 개발 도구. 컴파일러 gnu c compiler 컴파일 gcc sample.c 실행 a.out 실행 파일 지정 컴파일 gcc –o sample sample.c 실행 sample.
Edit the text with your own short phrases. The animation is already done for you; just copy and paste the slide into your existing presentation. PARCC.
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
Ar: Unix Archiver Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users” Third Edition, Prentice-Hall,
Tutorial Six Linux Basics CompSci Semester Two 2016.
Precept I : Lab Environment, Unix, Bash, Emacs
ENEE150 Discussion 01 Section 0101 Adam Wang.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
SEEM3460 Tutorial Unix Introduction.
CS1010: Intro Workshop.
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
Useful Linux Commands.
Command line arguments
Multi-module programming in C
Welcome to CSCI 230! Problem Solving using C
SEEM3460 Tutorial Unix Introduction Xinshi Lin & Zihao Fu
Operating Systems Lecture 5.
Multi-module programming in C
The Unix File System.
Lab 00 Discussion Linux Basics
Multi-module programming in C
The Linux Command Line Chapter 4
Using emacs and G++ at U. W.
Графика в Pascal.
Compile and run c files.
The Linux Command Line Chapter 4
Presentation transcript:

SEEM3460 Tutorial Multi-module programming in C

Copy the material Create the directory mkdir c_multi cd c_multi mkdir ask cd ask Copy files cp ~seem3460/distribute/c_multi-module/ask/ask_reverse.c ask_reverse.c cp ~seem3460/distribute/c_multi-module/ask/ask_palindrome.c ask_palindrome.c

Framework 1 reverse.opalindrome.o ask_palindrome (place to start) ask_reverse

Target Structure reverse.creverse.hpalindrome.cpalindrome.h ask_palindrome.c (place to start) ask_reverse.c

Modularizing Reverse reverse.c #include #include “reverse.h” int reverse(...) {... } reverse.h int reverse(...); ask_reverse.c #include #include “reverse.h” int main() {... } int reverse(...) {... }

Modularizing Reverse Create “reverse.h” and “reverse.c” How to paste under unix: Shift+insert, right click (not in x-win32) With the help of copy and paste >cp ask_reverse.c reverse.c >cp reverse.c reverse.h Edit “reverse.c” and “reverse.h” Edit “ask_reverse.c”

Compile Create.o files: gcc -c reverse.c gcc -c ask_reverse.c Link.o files as executables: gcc -o ask_reverse ask_reverse.o reverse.o

Modularizing palindrome palindrome.c #include #include “palindrome.h” int palindrome(...) {... } palindrome.h int palindrome(...); ask_palindrome.c #include #include “palindrome.h” #include “reverse.h” int palindrome(...) {... } int reverse(...) {... } int main(...) {... }

Compile Create.o files: gcc -c palindrome.c gcc -c ask_palindrome.c Link.o files as executables: gcc -o ask_palindrome ask_palindrome.o palindrome.o reverse.o

Framework 2 (for your interest) rectangle.oreplace.oprint_rect.o label_rect (place to start) area_rect.o cp ~seem3460/distribute/c_multi-module/label/label_rect.c