Programming with Visual C++ A short review of the process

Preview:

Citation preview

Programming with Visual C++

A short review of the process

2

Windows Programming Environment - MS Dev Studio

Start 5:45 PM

File Edit View Insert Project Build Tools Window Help

toolbars...

Message Window

File Window

ViewWindow

4

Windows ProgrammingStart New Project

• Microsoft Visual C++ 5.0

• Start -- Programs -- MS VC++ -- MS VC++

• To create a new project:– file -- new -- projects -- Win32 Console

Application– Identify storage location for new project– Provide Project name– OK

7

Windows ProgrammingAdd / Create files

• Project -- Add to Project -- Files

• Locate desired files.

• Repeat for all needed files

• For new files:

• Project -- Add to Project -- New

• Select file type.

9

Windows ProgrammingAdd Libraries

• Project -- Settings

• link tab -- category = General -- add library names to “Object/library modules”

• for sockets, add “wsock32.lib”

11

Windows ProgrammingSelect Active Configuration

• Two compile configurations available– Release– Debug

• Build -- Set Active Configuration

• Select either Debug or Release– Note that debug versions create large

(megabyte) files.

13

Windows ProgrammingBuild and Execute Project

• Build -- Build “project_name”

• Check message window for compile and link status.

• If no errors are indicated, execute program.

• Build -- Execute “project name”

Recommended