Windows NT Systems Programming
[ Home
| Syllabus |Course Notes]
How to Compile Version 2
Version 2 consists of two separate
programs. One for the Server and one for the Client.
I will give directions for the server
program. You will also need to repeat them for the client.
I store the two programs in separate
directories.
There is a test of the message object
in the "Test" directory under the "Client"
directory.
Currently that is all that is available
on the web site for the client side program.
Downloading Version 2
From The Browser
- You can click on the version from
the home page
(or use this short cut - Version 2)
- You need to download both the
client and the server code which are in two directories.
- From the directory listed, select
the files to download (*.cpp ,*.h and *.mak)
- After it appears in your browser,
save the file in a convenient directory
(click "File, Save as" in most browsers)
From the Lab, all files are accessible
from
~wild/public_html/Programs
- Copy
~wild/public_html/Programs/Version2/Server/* to a
convenient directory
(I prefer to keep all interesting files in the UNIX
file system and access them from Windows NT)
Compiling using Visual C++ IDE
- Start Visual C++ (Close help
dialog if it comes up)
- Create New Project
- Click "File/New"
(or CTL-N) to get project creation dialog box.
- Select "Win32 Console
Application"
- Name your project (for
example "server")
this goes in the "Project Name" box
- Select any directory for
the project (e.g. server) (It is highly
recommended that each project goes in its own
directory and that it is the same directory you
downloaded the files above)
this goes in the "Location" box
- Click "OK" to
close dialog box.
- Import source file
- Click "Project/Add to
Project/Files" to get file selection dialog
box
- Select the files you
downloaded earlier from the server directory
- Click "OK"
- Add winsock library
- Click
"Project/Settings" to get settings
dialog box
- Select "Link"
tab
- Click in
"Object/libraries Modules" text box,
goto end and type " wsock32.lib"
- Click "OK"
- Build the project
- Click "Build/Build
server.exe"
If all is well, it will compile and link your
project
Repeat this for the client files (you
can restart vc++ or close the current workspace).
Compiling from a Console Window
- Open a console window (Command
prompt in windows NT or DOS command prompt in Windows 95)
- Change to the directory containing
source files
- Type the command "nmake"
with the makefile name
- This will compile and link the
program and place the output into an appropriate
subdirectory
Executing the Program from VC++ IDE
Click "Build/Execute
server.exe"
Start up another vc++ program, and
click "Build/Execute client.exe"
Executing the Program from Console Window
In the Console Window
- change directory to
"Release/Debug" as appropriate
- execute "server.exe"
Start another console window and start
"client.exe"
Copyright chris wild 1997.
For problems or questions regarding this web contact [Dr. Wild].
Last updated: September 05, 1997.