Creating Programs on UNIX This term you can create programs on UNIX or you can create programs using a C++ compiler on your PC. This set of slides steps.

Slides:



Advertisements
Similar presentations
Directorate of Learning Resources Accessing electronic journals from off-campus This causes lots of headaches, but dont despair, heres how to do it! If.
Advertisements

E-books and E-journals Off-campus This presentation will show you how to log in and access Oxford Brookes Library e-books and e-journals when youre off.
Accessing electronic journals from off- campus This causes lots of headaches, but dont despair, heres how to do it! (Please note – this presentation is.
E-books and E-journals Off-campus This presentation will show you how to log in and access Oxford Brookes Library e-books and e-journals when youre off.
Kyira Hauer; Associate Director; NAMI Wisconsin (608) ; Presented By: NAMI Wisconsin Affiliate Profile Center Training.
How to use a scanner Throughout this slide show there will be hyperlinks (highlighted in blue) follow the hyperlinks to navigate to the specified Topic.
Author Instructions How to upload a full session proposal with abstracts – two step process.
Author Instructions How to upload a full session proposal with abstracts – two step process.
Zhang Hongyi CSCI2100B Data Structures Tutorial 2
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
INF 123: Software Architectures, Distributed Systems, and Interoperability Discussion Session Week 3 - Spring 2008 Instructor: Prof. Richard N. Taylor.
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.
Need your MyMathLab card with your access code Need a Valid Address Need to know Purdue’s zip code is and your course ID for your Class You.
Need your MyMathLab card with your access code Need a Valid Address Need to know Purdue’s zip code is and your course ID for your Class You.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
UPLOADING YOUR SERVER CODE TO YOUR VIRTUAL MACHINE.
Downloading and Installing AutoCAD Architecture 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the software.
1 Welcome to the Colgate University Online Employment System Applicant Tutorial.
Activating Pilot Account ( first time users ) Web-based Activation Browse to 1. Click on the link on the lower right that says.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 1Winter Quarter Introduction to UNIX.
New School Websites Teacher Pages. Visit the SCUSD Website for videos tutorials: For more information.
Creating a Web Page HTML, FrontPage, Word, Composer.
A crash course in njit’s Afs
Agenda What is Computer Programming? The Programming Process
Welcome to the Southeastern Louisiana University’s Online Employment Site Applicant Tutorial!
CS105 Lab 1 – Introduction Section: ??? TA: ??? ??? Announcements CITES Accounts Compass Netfiles Other Administrative Information CS105 Fall
UC Berkeley, Employment Services Candidate Gateway Tutorial External Applicants.
Lab How to Use WANem Last Update Copyright 2011 Kenneth M. Chipps Ph.D. 1.
Getting Started with Moodle Getting Started Logging In Entering Your Address Viewing a Course Navigating Your Course’s Homepage Personalizing Your.
Connecting to USF Network for Web Site SSH Secure Shell is the FTP program you will use to download your http files onto the USF server. To get the SSH.
Introduction to the WebBoard Terry Dennis. The WebBoard - Our Connection The WebBoard URL is
CS161 Topic #21 CS161 Introduction to Computer Science Topic #2.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
Tablet Camp 2015 Resource Guide for Students at Klein ISD 1:1 Campuses.
This presentation is designed to help assist you in registering and creating an account to do online homework using the MyMathLab program via CourseCompass.
Credit Union National Association Installing and Uploading Project Zip Code.
This tip sheet focuses on the elements required to access SMART. Total Pages: 5 Accessing SMART Logging In Agency/Facility/Program Access Logging Out IGSR.
1 ITI 1120 Lab # 1 An Introduction to the Lab Environment Contributors: G. Arbez, M. Eid, D. Inkpen, A. Williams, D. Amyot.
Author Instructions How to upload Abstracts and Sessions to the Paper Management System.
Go to your school’s web locker site school name.schoolweblockers.com) Your user name is the first letter of your first name, the first 4.
CCHD Grant Application Using the Online System. Sign In to the Online System Enter you complete address If this is your first time using CCHD’s.
Downloading and Installing Autodesk Revit 2016
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
For Authors Power Point How to Upload Abstracts to the Paper Management System.
Publishing Your Web Pages Ann Emmanuel SIUE Web Administrator
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
CMSC 104, Version 8/061L01Introduction.ppt Introduction CMSC 104 Problem Solving and Computer Programming.
20 th Analysis and Computation Specialty Track Power Point How to Upload Abstracts and Sessions to the Paper Management System.
Go to your school’s web locker site Your user name is the first letter of your first name, the first four letters of.
Aug Introduction CMSC 104 section 301 Problem Solving and Computer Programming Fall 05.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
Turnitin Guide Student Instructions. Creating a Student Turnitin.com Account **If you already have a Turnitin.com account, skip to slide 7, titled “Login.”
1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections.
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.
Author Instructions How to upload Abstracts and Sessions to the Paper Management System.
The Technical Side of Being a Navarro College Student Tools to Help you Succeed!
ELISTING How to use eListing to conveniently and quickly file your personal property listing online. DEPARTMENT OF ASSESSMENTS King County To navigate.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Avoid plagiarism Save time and aggravation Make your life EASIER!
Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
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.
First Day in Lab Making a C++ program
Journal of Mountain Science (JMS)
CS1010: Intro Workshop.
Creating Programs on UNIX
Getting Started: Amazon AWS Account Creation
Presentation transcript:

Creating Programs on UNIX This term you can create programs on UNIX or you can create programs using a C++ compiler on your PC. This set of slides steps you through how to create a program on UNIX. At least two programs this term will be implemented on unix.

Odin account First you need an odin account You can get one by going to Smith 18 Or, you can get one by going to: For help you can go Or go to:

Download ssh or putty In order to have your PC or Mac act like a remote terminal for our computers on campus, you will need to download ssh or putty (for free…don’t select a site that requires you to pay!) For a tutorial you can go to: unix-from-windows-2.html unix-from-windows-2.html If you can’t remember that just go to and search on ssh

Logging into Odin with ssh OK, so once you have downloaded ssh or putty, you can begin to use it to login to the school computers Of course, this assume you have an internet connection. Double click on the ssh, or putty, application

Double Click on SSH

Now, login by hitting enter

Enter in odin.pdx.edu and login name, then click on “connect”

Now…time for your password

Now, Just hit “ok” one more time

Finally, we are on odin!!!!!

This is what you’ll see SSH Secure Shell (Build 283) Copyright (c) SSH Communications Security Corp - This copy of SSH Secure Shell is a non-commercial version. This version does not include PKI and PKCS #11 functionality. Last login: Wed Sep 26 10:33: from c #motd updated Tue Oct 19 17:30:00 PDT 2004 ************************************************************* Welcome to the ODIN odin.pdx.edu ************************************************************* HAVING PROBLEMS? Contact the Academic Computing Services for problems that you encounter using ODIN. Please or call our helpdesk at " ". ************************************************************* Unauthorized access to this system is prohibited. Systems to identify unauthorized users may also monitor authorized users. ************************************************************* There are new messages Welcome to the PSU Network Access Menu Please review any messages on your screen then press the RETURN key to continue

Hit return….you’ll see a menu

We want to exit this menu… So, type 4 followed by hitting the enter key Main Network Access Menu 1. Electronic Mail (Pine) 2. Read Important Announcements 3. Change Password 4. Exit To Shell Prompt 5. Logout Enter the number of your choice from above: 4

We are now at the UNIX prompt

This is what that looks like close up Returning to unix shell. Type "logout" when finished or type "psumenu" to re-enter this menu karlaf:~/:501 > mkdir cs162 karlaf:~/:502 >

For the first time you login… The first time you login, you’ll want to create a cs162 directory where you will be doing all of your homework for this course. Type at the unix prompt: mkdir cs162 Follow this by hitting the enter key Make sure to enter everything lower case And, once this is created, you won’t need to do it again

This is what your screen looks like Returning to unix shell. Type "logout" when finished or type "psumenu" to re-enter this menu karlaf:~/:501 > mkdir cs162 karlaf:~/:502 >

Now, change into that directory Now, to enter that directory to start to work type: cd cs162 Follow this by hitting the enter key “No news” is “good news” in unix! Your prompt on odin will look different than my prompt…

This is what my screen shows Returning to unix shell. Type "logout" when finished or type "psumenu" to re-enter this menu karlaf:~/:501 > mkdir cs162 karlaf:~/:502 > cd cs162 karlaf:~/cs162/:503 >

OK, now let’s start programming Now you are ready to start typing in your first program (which is pass/no pass). Use pico to type in a program. So, type at the unix prompt: pico prog1.cpp Follow this by hitting the enter key

OK, so before I hit enter it looks like this Returning to unix shell. Type "logout" when finished or type "psumenu" to re-enter this menu karlaf:~/:501 > mkdir cs162 karlaf:~/:502 > cd cs162 karlaf:~/cs162/:503 > pico prog1.cpp

After hitting enter, we are in the pico editor

Pico Commands Luckily, the pico commands are listed at the bottom of your window The ^ means to hit the control key control x means to exit control o means to save your work control r means to read in a file control v means to go to the next page I mostly use the first two

You are ready to type a program 1. Enter in the program from the Malik book - at the end of Chapter 2 titled "Complete Program Listing" immediately before the "Quick Review". 2. Enter the entire program – including comments! If you are looking for something a little more exciting, you can pick the program at the end of Chapter 5 instead. 3. Make sure to also add your name!

So, Just start typing! With pico, you can just start typing. You can use the arrow keys You can use a different example if you aren’t able to get a copy of our book. Just make sure it is a “complete” program

I did part of it….watch for typos!

OK, make sure to save it! Type control o to save your file It will ask you if you really want to save it still as prog1.cpp Just hit enter (you DO want to save it as prog1.cpp) If it takes you awhile to type in the program, I would save it periodically… Type control x to exit pico

Back at the unix prompt Now we are back to the unix prompt It is time to “compile” your program to see if it works! Compile your C++ source code file. The command to do this is: g++ prog1.cpp Follow this by hitting the enter key

Using the compiler Again, with unix “no news” is “good news” karlaf:~/cs162/:510 > g++ prog1.cpp karlaf:~/cs162/:511 > But, let’s say I forgot a semicolon after the return 0; karlaf:~/cs162/:510 > g++ prog1.cpp prog1.cpp: In function 'int main()': prog1.cpp:25: error: expected ';' before '}' token karlaf:~/cs162/:511 >

So, get back into the editor Start up pico again and use the arrow keys to move around and modify your program Save your changes and then exit pico again… karlaf:~/cs162/:510 > g++ prog1.cpp prog1.cpp: In function 'int main()': prog1.cpp:25: error: expected ';' before '}' token karlaf:~/cs162/:511 > karlaf:~/cs162/:511 > pico prog1.cpp

Back at the unix prompt After any corrections, you would get back to the unix prompt It is time to “compile” your program to see if it works this time Compile your C++ source code file. The command to do this is: g++ prog1.cpp Follow this by hitting the enter key

Time to run your program Once the program successful compiles, with no error messages, you can run your program by typing:./a.out karlaf:~/cs162/:512 >./a.out We did it - we entered our first program! karlaf:~/cs162/:513 >

Double check that it ran ok Double check that the program ran as the book describes Make any necessary changes (with pico) Each time you change your program you need to re-compile with g++ And, then you can run your program with./a.out

Ready to turn it in? When you are satisfied with the program MAKE SURE your name is in the program (in comments) // Beth Miller At the unix prompt type (all on one line) mailx -s “My Name - Prog #1 Submission” <prog1.cpp Follow this by hitting the enter key