Game Engine Architecture

(Ben Green) #1
77

tions include debugging information so that you can track down prob-
lems during development of your game. The fi nal production build will
have all the debug info stripped out to prevent hacking.
z Preprocessor Tab/Preprocessor Defi nitions. This very handy fi eld lists any
number of C/C++ preprocessor symbols that should be defi ned in the
code when it is compiled. See Preprocessor Sett ings in Section 2.2.4.1 for a
discussion of preprocessor-defi ned symbols.

Linker Tab


The “Linker” tab lists properties that aff ect how your object code fi les will be
linked into an executable or DLL. Again, you are encouraged to explore the
various subpages. Some commonly used sett ings follow.


z General Tab/Output File. This sett ing lists the name and location of the
fi nal product of the build, usually an executable or DLL.
z General Tab/Additional Library Directories. Much like the C/C++ Include
Directories fi eld, this fi eld lists zero or more directories that will be
searched when looking for libraries and object fi les to link into the fi nal
executable.
z Input Tab/Additional Dependencies. This fi eld lists external libraries that you
want linked into your executable or DLL. For example, the Ogre libraries
would be listed here if you are building an Ogre-enabled application.
Note that Visual Studio employs various “magic spells” to specify librar-
ies that should be linked into an executable. For example, a special #pragma
instruction in your source code can be used to instruct the linker to automati-
cally link with a particular library. For this reason, you may not see all of the
libraries you’re actually linking to in the “Additional Dependencies” fi eld. (In
fact, that’s why they are called additional dependencies.) You may have noticed,
for example, that Direct X applications do not list all of the DirectX libraries
manually in their “Additional Dependencies” fi eld. Now you know why.


2.2.4.4. Creating New .vcproj Files


With so many preprocessor, compiler, and linker options, all of which must
be set properly, creating a new project may seem like an impossibly daunting
task. I usually take one of the following two approaches when creating a new
Visual Studio project.


Use a Wizard


Visual Studio provides a wide variety of wizards to create new projects of
various kinds. If you can fi nd a wizard that does what you want, this is the
easiest way to create a new project.


2.2. Microsoft Visual Studio

Free download pdf