'LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

北慕城南 提交于 2019-12-24 11:44:13

问题


I am using visual studio 2012.i got the error

LNK1112: module machine type 'x64' conflicts with target machine type
'X86'highgui248d.lib(opencv_highgui248d.dll)' while building a win32 
console application.

I have tried modifying the property to match with my open_cv application requirement.


回答1:


Here's the answer for your issue. Probably you need to change the platform in Build configuration manager https://stackoverflow.com/a/4364020/3724463




回答2:


I found the solution to this annoying problem, just follow steps below:

  1. In your Project Properties -> VC++ Directories -> Library Directories check that you have included only x64 build path if not please remove the x86 build path (something like this: C:\opencv2413\build\x64\vc12\lib) make changes according to extraction path of OpenCV in your system.

  2. In your Project Properties -> Linker -> General -> Additional Library Directories check that it is set to x64 and not x86 like this ($(OPENCV_BUILD)\x64\vc12\lib).

  3. If you have added a property sheet apply above steps to same.

  4. Delete Release|Win32 and Debug|Win32 (or Release|X86 and Debug|X86) in property Manager.

  5. Build your project using Release or Debug x64.

If this doesn't work please let me know, I would be glad to help.



来源:https://stackoverflow.com/questions/25936688/lnk1112-module-machine-type-x64-conflicts-with-target-machine-type-x86

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!