To get setup to work with Gtest and Genesis do the following:


1) Install Genesis3D if you haven't already.

2) The Gtest source files are located in the subdirectory \src under the directory you installed Genesis to. Since we will be making changes to this source let's make a backup first. This way we will still have the original around to refer to if needed. Create a new subdirectory under the Genesis directory and call it \srcback. Copy everything in \src to \srcback.

*Important Note* You will need to backup any code you are working on to a different directory before installing any further releases of Genesis. If you don't, the Genesis install will overwrite your work and you will lose it. It's also a good idea to backup your work periodically just in case disaster strikes.

3) Startup Visual C++ 6.0.

4) In Visual C++: Select File -> Open Workspace from the menubar. In the window that pops up, Navigate to the \src subdirectory of the Genesis directory. Change the Files of Type: box at the bottom of the popup window to Projects (.dsp). Now you should see one project file displayed in the popup window called GTest.dsp. Double click on GTest.dsp.

5) In Visual C++: Select File -> Save Workspace from the menubar.

6) Your project is now set up. When you run Visual C++ anytime after this you will be able to access your Gtest project again by simply selecting File -> Recent Workspaces -> GTest from the menubar.



You may want to test your setup now by running a compile. To compile do the following:


1) In Visual C++: Select Build -> Set Active Configuration from the menubar. This will pop up a window with a list of configurations that were setup for the project. You should see two configurations listed for Gtest: GTest - Win32 Release & GTest - Win32 Debug. GTest - Win32 Release creates an optimized compile suitable for play testing and final release. GTest - Win32 Debug creates an unoptimized compile with debugging code that you can run with VC++'s debugger.


Note: The Debug version of gtest.exe will run much slower than the Release version due to the addition of debugging code and the lack of optimizations in it.


Since we're just going to do a test compile select GTest - Win32 Release and click OK.


2) In Visual C++: Select Build -> Build GTest.exe from the menubar. VC++ will now compile and link a Release version of gtest.exe. This will take a minute or two. You can watch the progress of the compile in the Build Tab window at the bottom of the VC++ screen. When the compile is finished, the last line in the Build Tab window should read: GTest.exe - 0 error(s), 0 warning(s).


You will find your newly compiled gtest.exe in the directory where you installed Genesis. Run it, if you like, just to see if everything is working ok.


You're done!




Copyright © 1999 KnowledgeVault Software. All Rights Reserved. Used here with permission.