Compiling a C Program. Before we can begin we must open a telnet session to phobos. There are a number of ways to do this, but the easiest is to click.

Slides:



Advertisements
Similar presentations
Windows 2000 Installation Process. There are three methods available to install the Windows 2000 operating system: Setup boot disks CD – Rom Over-the-network.
Advertisements

Litmus Learning Primer tests
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
 Replace the text in all the text boxes and enter your own information.  To do this, triple- click on the existing text and simply start typing.  Do.
Chapter One The Essence of UNIX.
Java Programming Working with TextPad. Using TextPad to Work with Java This text editor is designed for working with Java You can download a trial version.
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Guide To UNIX Using Linux Third Edition
Macros for Beginners Patrick Armatis University of Michigan-Dearborn.
Activating Pilot Account ( first time users ) Web-based Activation Browse to 1. Click on the link on the lower right that says.
Transferring Data from XL-30 PC to Dell PC Using Link Maven.
Word Lesson 16 Working with Macros Microsoft Office 2010 Advanced Cable / Morrison 1.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
Agenda What is Computer Programming? The Programming Process
Objectives Define IP Address To be able to assign an IP address with its Subnet Mask and Default Gateway to a PC that operates using Windows 7 or Fedora.
Introduction to VBA MGMI Aug What is VBA? VBA = Visual Basic for Application Excel’s powerful built-in programming language An event-driven.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Keyboarding Vocabulary Key Computer Terms. Click To rapidly press and release the mouse button To rapidly press and release the mouse button.
Window xp installation. Minimum HARDWARE REQUIREMENTS Minimum HARDWARE REQUIREMENTS PC with 300 megahertz or higher processor clock speed recommended;
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
Targeted Training, LLC. APPLYING STYLES DOWNLOAD FREE TRIAL OF ADOBE CONTRIBUTE ADOBE CONTRIBUTE CONNECTION WIZARD ENTERING EDIT MODE WEB PUBLISHING PROCESS.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Ch 101 Chapter 10 Introduction to Batch Files. Ch 102 Overview A batch file is a text file that contains an ordered series of commands.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Let’s get started using Visual Basic!. Private Sub cmdGo_Click... Dim strMessage As String Dim sngSum As Single If IsNumeric(txtNumber1.Text) = False.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
TeamViewer – Remote Session Control By Phil Goff SIR Branch 116 July 21, 2011.
BZUPAGES.COM ADS Wizard Logon on the server as Administrator Click start, run and type in dcpromo then Enter The ADS wizard appears.
Standard Grade Programming using VB 1 Programming Visual Basic.
Chapter 9 Using Text Editors. vi Editor visual Editor, ASCII text editor, no formatting capabilities almost as powerful as MS Word, has 26 clipboards.
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
Chapter Three The UNIX Editors.
Telnet allows you to log in remotely to other computers connected to the Internet (but only computers that are set up to be logged in to). Once logged.
Connecting to Linux at UMBC by using Tera Term SSH Presented by David Nardozzi.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Chapter 23. Copyright 2003, Paradigm Publishing Inc. CHAPTER 23 BACKNEXTEND 23-2 LINKS TO OBJECTIVES Record, Run, Pause, and Delete Macros Record, Run,
Fall 2003Sylnovie Merchant, Ph.D. ACCESS Tutorial Note: The purpose of this tutorial is to provide an introduction to some of the functions of ACCESS in.
Chapter 28 - Remote Login and Remote Desktops(TELNET) Introduction Early Computers Used Textual Interfaces A Timesharing System Requires User Identification.
Create the cover page by inserting clip art, WordArt, and text. Triple-click and enter your name here. Do not press the delete key! Triple-click and enter.
RT-LAB Electrical Applications 1 Opal-RT Technologies Use of the “Store Embedded” mode Solution RT-LAB for PC-104.
When you run a scenario, the Vusers on each host machine use the host’s IP address. You can define multiple IP addresses on a host machine to emulate a.
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
Agenda Using FTP What is FTP? How to Use the FTP Program How to transfer files Using FTP.
Java On the ENB 116 Computers The JDK is now available on the ENB 116 computers. You can use a classroom computer rather than your own laptop or CIRCE.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
I can run this simple BAT file to copy files: (this was tried with and without the pause command)
Word 2010 Headers and Footers You can make your document look professional and polished by utilizing headers and footers. The header is a section of the.
BIF703 FTP (File Transfer Protocol) Utility vi editor Utility.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: Week 14 – UNIX vi text editor.
Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
SPS-70DL Download Documentation Step-by-Step. SPS-70DL Download Documentation (USB Driver Installation) End user (client) logs onto Transcell WebStore.
GRID COMPUTING.
First Day in Lab Making a C++ program
CS1010: Intro Workshop.
Guide To UNIX Using Linux Third Edition
1. Introduction to Visual Basic
Users and Accounts Lab 0.1. Users and Accounts Lab 0.1.
Assembler, Compiler, Interpreter
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Lab 10 Instructions You can use g++ on build server, visual studio on local machine or your preferred C++ IDE. Important Note: For your grade, please show.
Run Java file with Window cmd
Chapter 2 Basic vi Editor.
Assembler, Compiler, Interpreter
An Introduction to Computers and Visual Basic
Presentation transcript:

Compiling a C Program

Before we can begin we must open a telnet session to phobos. There are a number of ways to do this, but the easiest is to click on Start, then Run, and then type the word telnet and press the Enter key.

A window will open on your desktop. This is what it looks like using Win2000. Type open phobos.senecac.on.ca and then press the Enter key. The Win98/95 method is next.

When the telnet window opens in Win98/95, click on Connect and then Remote System.

Type phobos.senecac.on.ca in the Text Box labeled Host Name, then click on Connect.

The procedure is the same from this point using either Win2000 or Win98/95. Enter your user name and then press Enter, and then enter your password and press Enter.

Once you have logged on to the system your cursor will be at the command prompt ($). We are going to use a program named nled to create our C source file. Type nled welcome.c at the command prompt and then press Enter.

The nled edit window opens in insertion mode. We can just start typing to enter text. Type the code for the C source file and then press the Escape key (Esc) and the x key at the same time to save your file and exit nled.

Your cursor will be back at the command prompt after nled closes. Type cc welcome.c and press Enter. phobos will pause for a moment while your file is compiled. When it is finished the command prompt will reappear. Type a.out to see the output of your C program.

What Happened? Our source code is a series of instructions that we want to have carried out. Our instructions must be translated in to a language that can be understood by a computer. When we type cc filename.c we are telling the computer we are using to compile our source file, using the C compiler, into an executable file that can be run to produce the desired result. Remember that when we are logged on to phobos using a telnet session that the source file and executable file reside on phobos. The executable file will only work on phobos. To create an executable file that will work on your local machine the source file would have to be compiled locally.

What Happened? The default name for an executable file on phobos is a.out. To give your C program another name you must tell the compiler at compile time. If we wanted to name our executable to be named welcome1 the command would be: cc welcome.c -o welcome1 The general format of the compile command is: cc source.c - produces a.out cc source.c -o outputname - produces outputname

Summary Open a telnet session to phobos Use nled to create a C source file Use the cc command to create an executable file The default name for the executable file on phobos is a.out Run the executable file by typing its name at the command prompt