简体   繁体   中英

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

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM