问题
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:
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.
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).
If you have added a property sheet apply above steps to same.
Delete Release|Win32 and Debug|Win32 (or Release|X86 and Debug|X86) in property Manager.
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