0

I have been trying to install Opencv in Windows, according to this link. I assume that the link helps in installation of opencv for both c++ and python.

More details about my system:

    ** Visual studio - 15.9.6
    ** Windows 10- 64 bit

    ** Complete error - 1>------ Build started: Project: gen_opencv_python_source, Configuration: Release Win32 ------
    2>------ Build started: Project: opencv_python3, Configuration: Release Win32 ------
    2>python36.lib(python36.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
    2>Done building project "opencv_python3.vcxproj" -- FAILED.

A popular answer for this question, suggested the following steps :

    Check your properties options in your linker settings at: Properties > 
   Configuration Properties > Linker > Advanced > Target Machine. Select 
   MachineX64 if you are targeting a 64 bit build, or MachineX86 if you are 
   making a 32 bit build.

From the image below, however, I do not have any other option other than Win32. And Looks like VSdoesn'thave a 64 bit release. How do I resolve this issue and what am I missing from the previous answer? Apologies if the issue is trivial.

enter image description here

Update

the python version I am using is 3.6.5 64 bit. could this be the issue, with VS being 32 bit?

Lakshmi Narayanan
  • 5,220
  • 13
  • 50
  • 92

1 Answers1

3

When you did select Visual Studio version in CMake (step 7.4.a) then it need select a 64 bit compiler: "Visual Studio 15 64" instead "Visual Studio 15".

Nuzhny
  • 1,869
  • 1
  • 7
  • 13