[SRC "C" index] [^^TECH index page] [^^ATECH home] [^^^fleeding HOME]
Via this link: [here]
NOTE: I'm pretty much a command line (CL) hacker/programmer. I
don't really understand all of the fancy (and continually
varrying programming IDE's (Inter-active development environments)
-- regarless that i helped to create quite a few of them -- i just
don't think that way. Thus, these are HELPER pages (copied off of
ms's fab pages. Hope they help. Refer to the orig links and enjoy
-- actually, the ms staff has done a super hoopy job in laying out
the info (tips towel in the general direction of redmonton ?sp?).
-- Share and enjoy,
Frank. all emails welcome: fleeding@hotmail.com
BUT *pleas* include in the SUBJECT LINE something like
Subject: TECH -- was wondering if you ???
when i see TECH (or EDU or something like that i don't
just automacially delete it -- such is the spam thing
these days!
On this page: {Set ENV vars}
{The CL env var} (Command line thingies)
{On the CL} (let's do it in the road!)
{On Compiling in General}
{Console Program}
Set ENV vars
Set Environment Variables
Home | Overview | Details
CL.EXE, LINK.EXE, and other command-line tools require that
certain environment variables be set properly.
These include PATH, which must point to the \bin subdirectory
of your Visual C++ installation, LIB, which must point to \lib,
and INCLUDE, which must point to \include.
When you install Visual C++, setup creates a batch file, VCVARS32.BAT,
containing commands to modify the PATH, LIB, and INCLUDE environment
variables. If these variables haven't been set properly, run VCVARS32.BAT
before you compile at the command prompt. VCVARS32.BAT is located in
the \bin subdirectory. Note that you do not need to run VCVARS32.BAT
if you are compiling your program inside the development environment.
To run VCVARS32.BAT
At the command prompt, change to the \bin subdirectory of your
Visual C++ installation.
Run VCVARS32.BAT by typing VCVARS32.
Note VCVARS32.BAT may vary from machine to machine. You should not
copy a missing or damaged VCVARS32.BAT file from another installation.
See Also CL Environment Variable, LINK Environment Variables, Using Environment Variables
(these are listed below)
Next: The CL env var.
{Back to the TOP of this page}
The CL env var
NOTE: you can (as always) do almost everything from the command line.
this is how i (we?) "real programmers" (what used to be called
hackers (in the good sense)) do things. Just give me a DOS or a UNIX
prompt any old day.
Thus, you can set THINGS up in the CL file to "fill in the blanks"
for the CL commands.
via the link: [ms site here]
CL Environment variable
Use the CL env variable to specify files and options without
giving them on the command line. The CL env var has
the following syntax:
SET CL = [ [option] ... [file] ...] [/link link-opt ...]
The CL env var is useful if you often specify a large number of FILES
and/or OPTIONS when you compile. You can define the files and options
inside the CL file that you are specifying.
NOTE: When you enter into and EXIT from a DOS SUB-SET
window, you may LOSE the current CL setting.
You can (of course) create a BATCH file that you
execute to set the CL var. That way, if you hae
(for example) several DOS windows open, they can
have the same (or different) CL file set ups etc.
This drives you nuts until you realise that each
time you create a new DOS shell window, you LOSE
everything but the defaults!!!
the ms site contunes:
you can not use the /D option to define a symbol that uses an "=" sign.
You can substitute the "#" sign for an "=" sign. In this way, you
can use the CL env var to define PRE-PROCESSOR constants with explicit
values (for example, /DDEBUG#1 for /DDEBUG=1
Example
The following example of a CL environment variable setting:
SET CL=/Zp2 /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ
is equivalent to the following CL command:
CL /Zp2 /Ox /I\INCLUDE\MYINCLS \LIB\BINMODE.OBJ INPUT.C
The following example causes CL to compile the source
files FILE1.C and FILE2.C, and then link the object
files FILE1.OBJ, FILE2.OBJ, and FILE3.OBJ:
SET CL=FILE1.C FILE2.C
CL FILE3.OBJ
This has the same effect as the following command line:
CL FILE1.C FILE2.C FILE3.OBJ
Next: On the CL.
{Back to the TOP of this page}
On the CL
On the m/s site: [here]
these are to set
the COMPILER OPTIONS.
You can set compiler (CL.EXE) options on the command line, or
in command files, or the CL env variable (as described {ABOVE}.
Next: Compiling (general how to).
{Back to the TOP of this page}
Compiling
This *has* to be one of the most frustrating things about V-C++
in the begiing (it was for me).
Where do i put my files?
How do i get the (#$()*()#*$))!!!! compiler to SEE my files
and pick up the DirectX stuff, and my libraries, etc. HELP!!!!
Pull up a rock and sit a while.
NOTE: This section discusses the IDE (integrated development environment)
-- usually refered to as the "visual studio" or whatever the
marketing types are calling it these days.
My notes (and those deemed most useful from the m/s site) are ABOVE
{On the CL}.
Primary starting link for the official m/s pages are:
[here]
At the TOP of the IDE, find the PROJECT menu.
Click on SETTINGS
You should see a PROJECT SETTINGS
dialog box,
this has several tabs
(esp the C/C++ TAB) on which you then select options.
Next: Create a CONSOLE PROGRAM. Proto-vision: I have you now!
{Back to the TOP of this page}
Createing a Console Program
Mirrored/adapted/annotated via the m/s page: [here]
On the FILE
menu,
select: NEW
then click PROJECTS
specify: PROJECT NAME
LOCATION
WORKSPACE
DEPENDENCY
PLATFOMRS
then double-click CONSOLE APPLICATION
(see how "simple" it is!!!!)
The PROJECT WORKSPACE
In Microsoft Visual C++, the Project Workspace is a
container for your development projects. When you
create a new project, a workspace is created at the
same time. You use the Project Workspace window to
view and access the various elements of your projects.
After you have created a project workspace, you can add:
New projects, including dependent projects.
New configurations to an existing project.
Subprojects (dependent projects).
The workspace directory is the root directory for the
project workspace. The projects you add to the project
workspace can be located on other paths, even on a
different drive.
When you create a project workspace, a project workspace
file ProjectName.dsw is created to store information at
the workspace level. Other associated files are also
created, including a project file (.dsp), for building a
single project, and a workspace options file (.opt).
The workspace options file stores settings such as those
you specify in the Project Settings dialog, and the layout
of the project workspace.
Note: If you work in a group, you can put the project
workspace file and project files under source-code
control and share them with other members of your group
so that they can build the projects defined in the project
workspace. However, you should not share the workspace
options file (.opt) because it contains information
specific to your computer. A new workspace options file
is created automatically when the workspace is opened
and no workspace options file is found. If you are using
exported makefiles, you should not share these files.
Other users can share the project workspace (.dsw) file
and project (.dsp) file, but they should export the
makefiles locally.
**** BONUS TRACKS ON DIRECT-X ******
Next: zzzz.
{Back to the TOP of this page}
Next: zzzz.
{Back to the TOP of this page}
Next: zzzz.
{Back to the TOP of this page}
Next: zzzz.
{Back to the TOP of this page}
Next: zzzz.
{Back to the TOP of this page}
Next: zzzz.
{Back to the TOP of this page}
Next: zzzz.
{Back to the TOP of this page}
Next: zzzz.
{Back to the TOP of this page}