csci 230 computing-i
DESCRIPTION
CSCI 230 Computing-I. Welcome to CSCI 230! Compiling Your First Program Using Microsoft Visual Studio 2005. Objectives for the Lab. Learn the difference between client-side and server-side programming Learn how to open an empty solution and project under Visual Studio .Net - PowerPoint PPT PresentationTRANSCRIPT
11
CSCI 230Computing-I
CSCI 230Computing-I
Welcome to CSCI 230!Welcome to CSCI 230!
Compiling Your First Program Using Compiling Your First Program Using Microsoft Visual Studio 2005Microsoft Visual Studio 2005
22
Objectives for the LabObjectives for the Lab
Learn the difference between client-side Learn the difference between client-side and server-side programmingand server-side programming
Learn how to open an empty solution and Learn how to open an empty solution and project under Visual Studio .Netproject under Visual Studio .Net
Compile and run a simple programCompile and run a simple program
33
Client-side vs Server-side compilingClient-side vs Server-side compiling
Environment setupEnvironment setup Install MS VS .Net 2005 from iuware.iu.eduInstall MS VS .Net 2005 from iuware.iu.edu
Client-side compiling runs locally on your computerClient-side compiling runs locally on your computer Requires installation of a compiler on your systemRequires installation of a compiler on your system Consumes local CPU and hard disk spaceConsumes local CPU and hard disk space No network (internet) connectivity requiredNo network (internet) connectivity required
Service-side compiling runs remotely on a serverService-side compiling runs remotely on a server Requires remote access software such as SSH available from iuware.iu.eduRequires remote access software such as SSH available from iuware.iu.edu Server is typically more powerful CPU and has more storage. Server is typically more powerful CPU and has more storage. Typically used for larger projectsTypically used for larger projects Easier to implement team development environmentEasier to implement team development environment Normally uses a command line interface rather than graphicalNormally uses a command line interface rather than graphical Network (internet) connectivity requiredNetwork (internet) connectivity required Used for business applications that require production infrastructure Used for business applications that require production infrastructure
(production monitoring, nightly backups, etc.)(production monitoring, nightly backups, etc.)
44
Start Microsoft Visual Studio 2005Start Microsoft Visual Studio 2005
Start → All Programs → Microsoft Visual Start → All Programs → Microsoft Visual Studio 2005 → Microsoft Visual Studio Studio 2005 → Microsoft Visual Studio 20052005
55
Starting for the first timeStarting for the first time
The first time you run The first time you run MSVS, you might get MSVS, you might get a window like this.a window like this.
Use General Use General Development Settings Development Settings if you have no if you have no preference.preference.
66
Initial MSVS DialogInitial MSVS Dialog
Here is an image of the initial MSVS Dialog.
77
Opening a New ProjectOpening a New Project
Open a project using File → New → Open a project using File → New → Project…Project…
88
Choose a Visual C++ Choose a Visual C++ Win32 Project TypeWin32 Project Type
Choose Win32 Choose Win32 Console ApplicationConsole Application
Enter a name for your Enter a name for your project.project.
Choose a Project Type and NameChoose a Project Type and Name
Project SettingsProject Settings
Choose Next > from the initial dialog.Choose Next > from the initial dialog.
1010
Project Settings (continued)Project Settings (continued)
Be sure to select Empty project and Finish.Be sure to select Empty project and Finish.
1111
Add a New ItemAdd a New Item
Right-Right-click on click on Source Source File and File and Add a Add a New New Item.Item.
1212
Create a main.cCreate a main.c
Choose Visual C++ Code, C++ File named Choose Visual C++ Code, C++ File named main.c.main.c.
1313
Enter your program into main.cEnter your program into main.c
Enter a standard C program into main.c. You get to use your mouse, copy, paste, and everything!
1414
Start your programStart your program
Select Debug → Select Debug → Start without Start without Debugging.Debugging.
1515
Examine your outputExamine your output
Your Your program program ran. ran. Check it Check it out!out!
1616
Congratulations!Congratulations!
You created a new Microsoft Visual Studio 2005 You created a new Microsoft Visual Studio 2005 Project.Project.
Selected Visual C++ Win32 Console Application.Selected Visual C++ Win32 Console Application. Created your own main.c file, entering code just Created your own main.c file, entering code just
like in class.like in class. And started your program to produce output/And started your program to produce output/ All of this using an easy editor and never logging All of this using an easy editor and never logging
onto the internet.onto the internet.