尝试加载格式不正确的程序。 (HRESULT异常:0x8007000B) [英] An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

查看:220
本文介绍了尝试加载格式不正确的程序。 (HRESULT异常:0x8007000B)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名技术大学的学生,我正在使用OpenGL来模拟机器人手臂。我在此链接中通过谷歌搜索找到了一个正式项目:



http://www.leniel.net/2008/02/robot-arm-with-opengl- in-csharp.html #sthash.EB03Qcsd.dpbs



当我运行它时,它会显示如下图所示的错误,我无法编译项目。我做了一个搜索,知道因为这个项目是用Window 32位编写的,而我的计算机运行的是Window 64位。我该如何解决这个问题?在我为机器人手臂编写自己的代码之前,我只想以此项目为例。请帮帮我。谢谢。



这是我的版画屏幕(对不起,我无法发布图片):



http: //i.stack.imgur.com/sJwAe.png

I'm a student from a university of technology and I'm doing my final project using OpenGL to simulate a robot arm. I found a formal project through google search in this link:

http://www.leniel.net/2008/02/robot-arm-with-opengl-in-csharp.html#sthash.EB03Qcsd.dpbs

When I run it, it show up an error as picture below and I cant compile the project. I did a search and knew that because this project was written in Window 32 bit and my computer is running Window 64 bit. How can I fix this issue? I just want to run this project as an example before I write my own code for my robot arm. Help me please. Thank you.

This is my printscreen (sorry I cant post the picture) :

http://i.stack.imgur.com/sJwAe.png

推荐答案

进入您的项目属性页面,在解决方案资源管理器中找到,然后单击构建选项卡。在那里你会找到平台目标。将其更改为x86并重新编译您的项目。这将强制您的项目仅以32位运行。



如果您将其保留为任何CPU,您的代码将作为32位应用程序运行32位Windows和64位Windows上的64位应用程序。这个问题是您使用的库可能只有32位,并且由于您无法在同一进程中混合使用32位和64位代码,因此会出现您正在查看的错误。
Go into your projects Properties page, found in Solution Explorer, and click on the Build tab. There you'll find "Platform target". Change it to x86 and recompile your project. This will force your project to run as 32-bit only.

If you leave it as "Any CPU", your code will run as a 32-bit app on 32-bit Windows and as a 64-bit app on 64-bit Windows. The problem with this is that the libraries you're using are probably 32-bit only, and since you cannot mix 32- and 64-bit code in the same process, you get the error you're looking at.


这篇关于尝试加载格式不正确的程序。 (HRESULT异常:0x8007000B)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆