Blepo Download
Downloading the library
Blepo versions available for download:
History of versions
Setting up your system
Once you have downloaded the code and unzipped it, you will need to do the
following to set up your system. Hopefully one day we will
have an installer that will take care of these steps automatically.
- The DLLs in the external/bin directory must be in your path. This can be accomplished on WindowsXP by selecting
Start Menu -> Control Panel -> System -> Advanced -> Environment Variables -> Path -> Edit. In the edit box, append the
full path to that directory, preceded by a semicolon with no extra spaces, for example, ";c:/blepo/external/bin" (without the quotes).
(If you already have Visual C++ running, then close and restart it in order to load the new path.)
- The NASM assembler, which is used to compile the assembly code, must be in your executable path. The name of this file is
nasm.exe and it resides in the external/bin directory. For some inexplicable reason the previous step does not
solve this problem, so you have to copy the nasm.exe file to an existing directory on your path, such as
C:/Windows/System32.
- You will need to add the gsl (GNU scientific library) path to your include directory.
- In Visual C++ 6.0,
Tools -> Options -> Directories -> Include files -> add blepo\external\WinGsl, where blepo is the path to your Blepo directory.
- In Visual Studio 2005/2008, follow the same step except Tools -> Options -> Projects -> VC++ Directories.
After this step,
any project you create should work automatically. Alternatively, you can
skip this step and add the include path individually to each project you create.
In addition, if you wish to capture images from a camera (e.g., USB webcam,
Data Translation DT3120, or IEEE 1394), you will need to install the driver.
For IEEE1394, you need to set it to use the CMU driver by following the instructions
in Capture/CaptureIEEE1394.h. If you have any trouble, see the help in
blepo/external/doc/IEEE1394. After installing the driver, you may test
your camera using Blepo code or the CMU test application in
blepo/external/bin/1394CameraDemo.exe
Getting started with VS6.0
Once you have performed these steps, you should be able to open Demo/Demo.dsw
or Test/Test.dsw in Visual C++ 6.0, compile the code, and run. These two
workspaces will be a good starting point for learning how to build an executable
using the library.
To create a new project to use Blepo,
- Create a project with File -> New -> Project
- Either Win32 Console Application -> An application that supports MFC, or
- MFC App Wizard (Dialog based is the simplest, but the other application types should work as well)
- Make the project use the Blepo library.
- The simplest option is to add Blepo to the workspace and make the project
dependent upon Blepo. More specifically,
- Project -> Insert Project into Workspace
- Select blepo/src/blepo.dsp
- Set your project to the active project again (Project -> Set Active Project)
- Make your project dependent upon Blepo (Project -> Dependencies, check the box next to Blepo)
- Alternatively, you can compile Blepo separately and just add the .lib files to
the project (the blepo.lib file as well as all the other .lib files in the Blepo project).
- Include the Blepo header file (#include "blepo.h"). For the compiler to find this file, you will need to do
one of the following:
- Add the blepo/src path to your project include path (Project -> Settings -> C/C++ -> Additional include directories), or
- add the path to your VC++ list of include directories (Tools -> Options -> Directories -> Include directories), or
- put the path into the #include statement.
Notes:
- When compiling on 64-bit Vista, some have received the error, "Performing custom build step ... nasmw.exe is not recognized as an internal or external command".
This problem has also appeared on at least one Windows XP machine. This problem was caused by Blepo using an old version of nasm.
It should not happen again.
Converting to Visual Studio 2005/2008
Once you have followed the steps in 'Setting up your system' above,
- Download and install VS2008 SP1, if you have not already.
- Make sure you have the Windows SDK installed on your system. It would be
in C:\Program Files\Microsoft SDKs\Windows\v6.1, and it comes with some installations
of Visual Studio. If you do not have it, download
Microsoft Windows SDK,
selecting the appropriate operating system, and install.
- Open Demo.dsp in VS2008. It will go through a conversion and create a
Demo solution. In the Solution explorer on the left you will see the Demo
project as a part of 'Solution Demo'.
- Right click Solution Demo and add Blepo.dsp to it. Once again it will
convert and add it. Now right click the Demo project and set Project
Dependencies-> Demo dependent on Blepo (select the check box for Blepo).
- Go to Tools->Options->Projects and Solution->VC++ Directories->Include files and set
"C:\Program Files\Microsoft SDKs\Windows\v6.1\Include" right at the top (above the Blepo include directory).
- Important: Right click the Blepo project in your solution explorer:
- Select 'All Configurations' in the dropdown box at the top
- Blepo->Properties->Configuration properties-> C++ -> General -> Additional
include directories -> add
./
and nothing else...
- In Tools --> Options --> VC++ Directories --> Include Files, please add
the following paths from your corresponding blepo directory, below the Microsoft SDK library path:
blepo\external\Microsoft\DirectX\DXSDK\Include
blepo\external\Microsoft\DirectX\DXSDK\Common
blepo\external\Microsoft\DirectX\DXSDK\BaseClasses
- Right click Blepo project->Properties->Configuration Properties->C/C++->
Preprocessor->
In preprocessor definitions,
change _WIN32_WINNT=0x400 to _WIN32_WINNT=0x500
- Go to Demo project->Properties->Configuration
properties->Linker->Input->Ignore specific library -> add LIBCMT.lib (You
may not need to do this, but some people have reported that it is necessary).
- Now go to Build -> Rebuild solution
- Ctrl+F5 to run the Demo.
- See the instructions above under 'Getting started with VS6.0' for creating a new project. The instructions
should largely translate to VS2005/2008.
Note: When using Visual Studio 2005/2008, you will receive compilation errors related to character strings.
To fix this problem, click on your project, then Properties->Configuration Properties->General->Character
set(under Project Defaults), set to "Use Multibyte Character set"
Enjoy!