Saturday, May 14, 2005

Building SWIFT: Issues and Tips

Package Details:

The SWIFT collision detection package is available from the UNC software page. The download is in the form of a ZIP file. The ZIP file contains the source code, documentation and an example project. Compiling the example project in .Net 2003 is straightforward after unpacking the ZIP file. The files are written in C++. The files swift.h and swift.lib must be included into a project to use the SWIFT collision detection package.

Rebuilding SWIFT:

The thesis project requires using a multi-threaded DLL runtime library because of the OpenHaptics Toolkit. The example SWIFT file is set to build using the single threaded runtime library. To test the SWIFT library the example project was build using the multi-threaded DLL option. To successfully build the example and the thesis project with the SWIFT library included, the SWIFT package must be rebuilt.

Rebuilding Source Code
  1. Open Project file swift.dsw
  2. Change Build Configuration from Debug to Release
  3. Change Project Properties->C/C++->Code Generation->Runtime Library
    • Multi-threaded DLL (/MD)
  4. Build Project
    • If Link errors occur see below

Including the SWIFT library into Existing Projects

  1. Check that Project Properties
    • C/C++->Code Generation->Runtime Library is set to Multi-threaded DLL (/MD)
    • C/C++->General->Additional Include Directories add path to swift.h header file. (ex. ..\swift\include\ )
    • Linker->General->Additional Library Directories add path to the rebuilt swift.lib file. (ex. ...\swift\release\ )
    • Linker->Input->Additional Dependencies add swift.lib
  2. Include swift.h

Possible Error Messages VC++ .Net 2003

If Link errors occur and complain about missing files it is caused by switching the runtime libraries. The missing files are a part of Visual Studio 6. If you don't have Visual Studio 6, trying searching the internet for the files or find someone with a copy of these files. Copy the Library and DLL files from a Visual Studio Directory to the windows/system32 directory or place them in the project folder.

0 Comments:

Post a Comment

<< Home


Counters