您的位置:首页 > 其它

【学习ARToolkit小记之一】 ARToolkit配置设置,解决64位操作系统运行sln生成错误

2015-04-22 11:20 661 查看
关于ARToolkit,最近在学习相关的东西,最初的系统配置就出现了问题,可谓小白的悲哀。不过,原因也不是全部出现在自身的身上,因为,官网及其他网站资料的配置方法都是基于windows32位系统和VC6.0或者VS2008的配置,按照权威的步骤最终实验多次都还是出现了同样的错误。生成-->批生产,结果48个失败(VS2010),查找了好几天,终于找出了原因,问题就出在我的是Windows7 64位操作系统。下面首先列举了官网提供的方法,具体链接为http://www.hitl.washington.edu/artoolkit/documentation/usersetup.htm

0、系统环境

1)Windows7 32/64位

2)VS2010

1、准备资源

PrerequisiteInstructions
Development environmentMicrosoft Visual Studio 6 and Microsoft Visual Studio .NET 2003 are supported, but it is also possible to build the toolkit using free development environments (e.g.
Cygwin, http://www.cygwin.com/)
DSVideoLib-0.0.8b-win32On Windows, DSVideoLib is used to handle communication with the camera driver. DSVideoLib-0.0.8b or later is required for ARToolKit 2.71.

A source + binary package of DSVideoLib is included on the ARToolKit downloads page on sourceforge.

GLUTVerify that GLUT runtime and SDK is installed. If not, you can download a binary package containing GLUT for Windows fromhttp://www.xmission.com/~nate/glut.html

Verify that you have the GLUT runtime installed in your system directory.

e.g. c:\windows\system32

glut32.dll

Verify that GLUT SDK is installed in your Visual C++ installation:

Include\gl\glut.h
Lib\glut32.lib

DirectX RuntimeVerify that DirectX runtime is installed: with Windows XP it is installed by default. You need to check your version; it must be 9.0b or later.

Video input devicePlug your camera or video input into your PC and install any necessary drivers. Verify that your camera has a VFW or WDM driver by running the program amcap.exe (this can be found in the DirectX SDK, in Samples\C++\DirectShow\Bin). Check for your camera
in the Devices menu (see Figure 1).



Figure 1: amcap Screenshot
(Optional, for VRML renderer only) OpenVRML-0.14.3-win32A source + binary package of OpenVRML is included on the ARToolKit
downloads page on sourceforge.
2、系统配置

You can now build ARToolKit. Build steps:

Unpack the ARToolKit zip to a convenient location. This location will be referred to below as {ARToolKit}.
Unpack the DSVideoLib zip into {ARToolKit}. Make sure that the directory is named "DSVL".
Copy the files DSVL.dll and DSVLd.dll from {ARToolKit}\DSVL\bin into {ARToolKit}\bin.
Install the GLUT DLL into the Windows System32 folder, and the library and headers into the VS platform SDK folders.
Run the script {ARToolKit}\Configure.win32.bat to create include/AR/config.h.
Open the ARToolKit.sln file (VS.NET) or ARToolkit.dsw file (VS6).
Build the toolkit.

The VRML renderering library and example (libARvrml & simpleVRML) are optional builds:

Unpack the OpenVRML zip into {ARToolKit}.
Copy js32.dll from {ARToolKit}\OpenVRML\bin into {ARToolKit}\bin.
Enable the libARvrml and simpleVRML projects in the VS configuration manager and build.

3、64位系统配置的不同

如果你是32位系统,运行sln批生成,结果一般最多2个失败,这个没什么关系;如果你是64位系统,那么上述配置需要一个地方进行修改,即上面系统配置的第4步,拷贝dll文件的位置不是“System32”文件件,而是SysWOW64(C:\Windows\SysWOW64)文件夹,即把所有的需要拷贝到System32文件夹的dll文件拷贝到SysWOW64文件夹中,运行sln,此时因为版本的不同需要转换,然后选择生成-->批生成,此时即可看到生成成功的结果。

4、实例演示

旋转中的小茶壶:运行bin文件夹中的“graphicsTest.exe”,即可看到运行结果如下:



图一

5、网上参考的其他设置方法
http://m.blog.csdn.net/blog/dragonly945707194/34932271
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐