Prasrit Kumar
Prasrit Kumar

Reputation: 11

'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.

Upvotes: 1

Views: 27841

Answers (2)

FutureJJ
FutureJJ

Reputation: 2688

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.

Upvotes: 0

Sndn
Sndn

Reputation: 980

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

Upvotes: 1

Related Questions