Getting Started (Windows)
- Make sure you have Microsoft Visual C++ 2005. The Express Edition is free for non-commercial use. If you use the Express Edition, make sure you follow all of Microsoft’s installation instructions, including installing and configuring the Platform SDK.
- Make sure you have CMake installed.
- Make sure you have SVN installed.
- Make sure you have Boost installed.
- Launch cmd.exe (or, if you have Cygwin installed, you can use the Cygwin console).
- Get the source code, as described in the post that brought you to this page. Here’s an example for the initial version of Bayts:
Bash
svn checkout http://programmicon.googlecode.com/svn/tags/IntroducingBayts-0.01 programmicon
- Close the command prompt.
- Configure the project with CMake. Launch CMakeSetup.exe (By default, the CMake installer will place a shortcut to this on your desktop, labeled simply CMake).
- For “Where is the source code,” choose the source directory. For Bayts, you’ll use programmicon\Bayts\src. Choose an appropriate directory for “Where to build the binaries.” I like to put it in programmicon\Bayts\build. CMake will automatically create this directory if it does not exist.
- Click “Configure”
- In the dialog that appears, you’ll probably want to choose “Visual Studio 8 2005″. You could also use “NMake Makefiles.” See below for more information.
- CMake will spend a few seconds detecting information about your build environment, then display some new information in the main window. When it’s done, click “Configure” again, then click “OK.”
- In the directory you selected for the build directory, you will find a Visual Studio solution. You’ll also find subdirectories for any sub-projects there might be. In the case of Bayts, that will be tmv, ann, and freeglut.
- At the time of this writing, CMake does not correctly set up dependencies between a project and it’s sub-projects with the “Visual Studio 8 2005″ project generator. So, if you’ve used that, you’ll have to go into each sub-project, open the solution file, and build it individually before building the main project. Again, with Bayts, that’s tmv, ann, and freeglut. You’ll save yourself some time with tmv if, instead of building the whole solution, you right-click on tmv in the Solution Explorer and select Build. This skips building the tmv_symband library.
- Once all of the sub-projects are built, you should be able to build the main project. While the project-interdependencies don’t get set up correctly, the search directories do, so the project will have no trouble finding the libraries you’ve just built.
- The app will show up in either the Debug or Release sub-directory of the build directory, depending on which version of the project you built. You can run it from Explorer, or from within Visual Studio.
NMake Notes
If you choose to use the “NMake Makefiles” generator, then you won’t need to worry about the inter-project dependencies, because the generator correctly handles them. You will probably need to launch CMakeSetup.exe from a Visual Studio 2005 Command Prompt.
If you are using the Express Edition of Visual C++, please be sure to install the Platform SDK as described on the VS Express web site. There is one extra step you’ll have to take that Microsoft doesn’t list. When you get to “Step 3:Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box”, you will need to also add these paths to your vcvars32.bat file. On my machine, it’s at C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vcvars32.bat. I added the paths to the beginning of the respective variables, and it worked out fine.