English 中文(简体)
EmguCV 64-bit Building 跑道错误
原标题:EmguCV 64-bit build runtime error

我正在讨论利用W7/x64 顾问办公室(W7x64)4和VS2010,将现有的32-bit EmguCV(Version 2.3/strong>)建设成64-bit的问题。 我购买了商业许可证,如果是这样的话,并从收据中提供的链接下载。

错误

System.TypeInitializationException was unhandled
 Message=The type initializer for  Emgu.CV.CvInvoke  threw an exception.
 Source=Emgu.CV
 TypeName=Emgu.CV.CvInvoke

我遵循。 事实上,我使用了本条中的样本项目,并用V2.2进行微调,但当我用V2.3双筒( em和开斋)取代时,这些样本就出现了错误。

Has anyone successfully built an Emgu (Version 2.3.x) x64 project? Please provide some guidance.

最佳回答

造成这一错误的原因(如果任何其他人都遇到同样的问题)是,尽管在“组合”产出目录中存在该方案,但该方案不能进入露头_imgproc231.dll或开放式cv_core231.dll。

有两个解决办法:

  1. 将这些物品添加到项目上,将其财产编为<编码>,总,因为它们是EMGU的两个关键档案。

  2. If step 1 doesn t work, replace the current key files in the bin folder with new copies.

If both methods fail then there may be a problem with the build, so download a new copy of EMGU from Sourceforge and try again. The error will later be incorporated within an technical article in order to provide a clearer explanation of how to solve it.

Cheers, Chris

问题回答

No need to add them to the project; VS will not let you. Simply open FaceRecognizer.cs at public static partial class CvInvoke and change:

[DllImport(CvInvoke.EXTERN_LIBRARY, CallingConvention = CvInvoke.CvCallingConvention)] 

:

[DllImport(Emgu.CV.CvInvoke.EXTERN_LIBRARY, CallingConvention = Emgu.CV.CvInvoke.CvCallingConvention)] 

确保你们改变所有这些。

第一种测试方式:从黄瓜铺设一顿的目录上开一个样本项目并运行。 例如,开放的世界范例并试图加以管理。 如果抽样项目存在问题,安装就正确。

For emgu cv sample projects, value of Output Path option in Build settings of the project is set to .... bin . To fix your project problem, open the project in visual studio and set value of Output Path option to C:Emguemgucv 2.9in . Try to run the project. It must run with success.

Now, set back the value of Output Path option to binDebug. Then, add all DLL files in the C:Emguemgucv 2.9in folder to your project using ADD -> Existing Item menu. similarly, add all DLL files in the C:Emguemgucv 2.9inx64 folder to your project using ADD -> Existing Item menu. Now, go to properties window and set Copy to Output Directory option of all dll files to Copy Always. Finally, in the Configuration Manager window, create a new configuration for x64 platform.

Good Luck





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...