CSCI 4190 Introduction to Robotic Algorithms

Programming in Windows

This page provides some basic information that will help you get IRA projects compiled and running in Windows. If you feel that you must program using Visual C++ in a Windows environment, read further. If you don't mind doing your projects in a Unix environment (i.e. on the CS dept. Suns or your own *nix machine), don't bother to read this page.

The projects for IRA make use of a few libraries. Two of them, dolt and filereader, are written by us. The other, CGAL, is a third-party creation.

You should install the libraries in the following order:

CGAL is the Computational Geometry Algorithms Library. Installing CGAL is probably the hardest part of getting the IRA projects working in Windows. This page provides installation instructions. Look for the sections discussing Visual C++-based installation. If you have a lot of trouble installing CGAL, let me know and I'll do my best to give you help.

Important: after you have installed CGAL, you must make the stlport STL distribution (that comes with CGAL) your default STL implementation. In VC++, go to Tools->Options->Directories, select "Show directories for Include files" and add a directory C:\Program Files\CGAL-2.4\STLPORT (or wherever you installed CGAL). Then, move it to the top of the list of directories.

dolt is a 2d graphics library that emphasizes simplicity and ease of use. dolt depends on the availability of OpenGL and GLUT. I'll assume you have these installed along with any necessary header files, etc. Information on how to do this is available on Additionally, depending on how you use dolt, it may or may not depend on CGAL. In our case, we do require CGAL for what we'll be doing, so you'll need to install dolt with CGAL support. Read the installation section on the dolt website for instructions on installing dolt with CGAL support.

filereader is a configuration file library. You won't actually need to use this yourself at all, but we use it in the support code for the projects. To install it, download it from here, unzip it and open the Visual Studio workspace (.dsw) file. Then, compile the library. Copy the filereader.lib file to your VC++ installation's Lib directory (usually something like C:\Program Files\Microsoft Visual Studio\VC98\Lib) and copy filereader.h to your Include directory (usually C:\Program Files\Microsoft Visual Studio\VC98\Include).

Now that you have all the necessary libraries installed, you need to compile your project in VC++. To do this, you need a workspace that has all the necessary options set. Download this file and unzip it. It contains a workspace file and a project file with all of the right compiler options, etc. set so that your program will link with all of the libraries it needs. Note that in order for this to work, you need to have the CGALROOT environment variable set in Windows (the setup for this should be done during the CGAL installation). After you open the workspace file in VC++, you can add source files to it with Project->Add To Project->Files, or by creating a new file within the workspace.

As you can see, getting your IRA projects to compile in Windows is quite complicated. As such, I very much recommend that unless you cannot live without Visual C++, you do your work in Unix. In any case, you'll have to write your labs and final project in Unix since the robot can't work with Windows, so it might pay to get used to it. If you do decide to try to get everything working in Windows and are having problems, let me know and I'll do my best to help.

Update 2/23/03 Installing the Simple Vector Library in Windows: This is very easy and is pretty much just like installing dolt or the filereader library. First download the windows source for SVL from this link. Unpack it and open the DSW file in MSVC++. Go to Build->Set Active Configuration and choose SVL Win32 Release. Build the library. You may also want to build the debug version but that probably isn't necessary. Now, copy the stuff in the "include" subdirectory of the SVL source to your Include directory (usually C:\Program Files\Microsoft Visual Studio\VC98\Include) and copy the stuff in the "lib" subdirectory to your Lib directory (usually C:\Program Files\Microsoft Visual Studio\VC98\Lib). Now SVL should be installed and usable. If you're using the project workspace I provide in the support code, everything should be all set up.

Kris Beevers []
Last updated 2/23/03