Docsity

Visual Studio Help Session: Creating and Configuring Projects in CSE687 - Prof. James Fawc, Study notes of Engineering

Partial preview of the text

Download Visual Studio Help Session: Creating and Configuring Projects in CSE687 - Prof. James Fawc and more Study notes Engineering in PDF only on Docsity!

CSE687 – Visual Studio Help Session

Jim Fawcett

With the help of

Ghanashyam Namboodirapad, Saurav Sen, and Murat Gungor

01 February 2005

8:00 PM

MadLab – 010 Link Hall

..\code\help

Create a blank solution. Solution is a text file inside a folder that helps Visual Studio manage projects..

Visual Studio Help Session, Spring 2004

..\code\help

Create a project. Project is an XML file that keeps track of files and properties. Add project to blank solution.

..\code\help

Wizard creates some files that we don’t need for Console Applications. I recommend you start with an empty project.

..\code\help

Now, we will add two files from a handouts folder to our project folder using browser. Just right click on file and select: “Save Target As:” Here, we download FileInfo.h, FileInfo.cpp

Visual Studio Help Session, Spring 2004

..\code\help

Target of download is our project folder Target is the Project folder to add the files: FileInfo.h, FileInfo.cpp

..\code\help

Now, we define the Preprocessor string needed to compile the fileInfo module’s main function. You get the Property Pages dialog by right-clicking on your project – here DemoFiles – and select properties.

..\code\help

O.K. It works! We could walk through this code with the debugger to help us see how it functions.

Visual Studio Help Session, Spring 2004

..\code\help

Now, we add an executive module that will use FileInfo to do some task. It’s time to add a new file, our Executive module, DemoFiles.cpp

..\code\help

To start, we’re just going to copy part of the FileInfo test stub into the executive. That will demonstrate the executive calling a server.

..\code\help

..\code\help

..\code\help

..\code\help

..\code\help

We added some necessary include files, defined a Preprocessor switch for this main, and added a definition in our project settings so it will be compiled.

..\code\help

Now, we’re single- stepping through our code with the debugger. Each press of F10 steps one line of source code, executing as it goes. Local Call Stack variables

Visual Studio Help Session, Spring 2004

..\code\help

If we press F11 we step into any function on the current line, even if it is in another file. If we press F11 we will step into the function setPath, even though it is defined in another file. Watches – any variable in scope. Note that we are selecting specific elements of the argv array.