2010-10-12 165 views
0

我想在我的C#应用​​程序中使用opengl中的纹理。 我使用的陶框架,我用这个代码C#opengl纹理

http://www.gamedev.net/community/for...opic_id=405453(后#2)

但我得到这个运行时错误:

An unhandled exception of type 'System.DllNotFoundException' occurred in WindowsFormsApplication1.exe 

Additional information: Unable to load DLL 'DevIL.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) 

有人能帮助我吗?

有没有其他方法可以做到这一点?

+0

错误消息有你需要的全部信息。在互联网中找到DevIL.dll(如果你没有它)并放在路径上的任何位置(在[windows directory] ​​\ system32的程序目录中)。 – alxx 2010-10-12 13:58:35

+0

DevIL是一个图像加载库:http://openil.sourceforge.net/ – Ishtar 2010-10-12 13:58:41

+0

我甚至把它放在sysyem32,但它不工作 – mrbm 2010-10-12 14:04:31

回答

1

我有这个问题与GLU.FreeGLUT.dll,但是当我安装陶框架解决了我的问题。 之前,我复制dll到win32,并在dotnet目录中,并添加到项目中的引用,但我收到此消息:“未处理的异常的类型System.DllNotFoundException'”

0

它看起来像问题是加载的DLL。你应该确保dll在你的项目中通过引用正确导入。在将它添加到项目后,请确保您没有移动或删除dll。

+0

我将它添加到我的参考文献中 而我还没有移动它! – mrbm 2010-10-12 14:02:03

+0

然后,你是否检查你是否有读取文件的权限,一切都很好?可以肯定的是,Visual Studio无法访问该文件或无法找到该文件,因此在某处必定存在问题。 – Gimly 2010-10-12 14:12:15

+0

是的,我是。 如果VS无法访问它,为什么当我输入它可以检测到模块的名称 – mrbm 2010-10-12 14:57:53

0

它表明您缺少DevIL。尝试获取并在继续之前进行安装。

+0

但是我在这里有它 C:\ Program Files \ TaoFramework \ bin – mrbm 2010-10-12 14:01:15

+0

http://flashexperiments.insh-allah.com/ApacheError126.html – Goz 2010-10-13 07:39:18