Ask Your Question
0

opencv_highgui249.lib(opencv_highgui249.dll) : fatal error LNK1112

asked 2014-10-01 08:27:18 -0600

souraklis gravatar image

I am trying to compile a simple opencv project from windows 7 64 bit OS. I am facing the following error: opencv_highgui249.lib(opencv_highgui249.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

In project properties , in Linker I put additional Library dependencies: E:...\opencv\build\x64\vc10\lib; and add all necessary libs in input-> Additional Dependencies. However, I ve got the avobe error.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-10-01 09:29:14 -0600

updated 2014-10-01 09:32:16 -0600

Your project is Win32 bit but you link it to 64 bit version of OpenCV. Solutions:

  1. Link your project to 32 bit version of OpenCV.
  2. Or change your project's settings to 64 bit, see this link for more details.
edit flag offensive delete link more

Comments

When I am trying to create new configuration with x64 variable in dropdown menu only contains win32 thus I ve got to create it. But in the field copy setting for only contains win32 option.

souraklis gravatar imagesouraklis ( 2014-10-01 09:47:18 -0600 )edit

In the fifth step 5.In the Type or select the new platform drop-down list, select a 64-bit platform. the dropdown menu is empty.

souraklis gravatar imagesouraklis ( 2014-10-01 09:50:42 -0600 )edit

It is possible that your machine is installed by a Windows 32 bit version, that makes VS installs its 32 bit version too. Hence, you did not find the "New" option and selected the 64 bit project.

tuannhtn gravatar imagetuannhtn ( 2014-10-01 10:39:56 -0600 )edit
1

answered 2014-10-01 10:21:34 -0600

Have you seen this question?

http://answers.opencv.org/question/34528/error-lnk1112-module-machine-type-x86-conflicts/

I'm not using windows or visual studio, but it looks exactly like your problem.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-10-01 08:27:18 -0600

Seen: 2,324 times

Last updated: Oct 01 '14