opencv-rust icon indicating copy to clipboard operation
opencv-rust copied to clipboard

Cannot build OpenCV on windows

Open Nagispace opened this issue 3 years ago • 3 comments

  1. Operating system Windows 10
  2. The way you installed OpenCV: chocolatey
  3. OpenCV version 4
  4. rustc version (rustc --version) rustc 1.62.1 (e092d0b6b 2022-07-16)
  5. Attach the full output of the following command from your project directory: out.txt

Nagispace avatar Jul 29 '22 18:07 Nagispace

Can you please do a cargo clean and then build with cargo build -vv and attach that output? The one you attached is missing some important debug data.

twistedfall avatar Jul 30 '22 12:07 twistedfall

Here is the console output: out.txt

Nagispace avatar Jul 30 '22 12:07 Nagispace

open Developer PowerShell for VS 2019 or run

$vsPath="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
Import-Module ("$vsPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
# -arch=x64 -host_arch=x64
# -arch=x86 -host_arch=x86
Enter-VsDevShell -VsInstallPath "$vsPath"  -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64"

openmynet avatar Sep 01 '22 07:09 openmynet

@Nagispace Can you please make sure that directory that contains opencv_world455.dll is in your PATH environment variable? Please also check troubleshooting guide, items 4 and 5: https://github.com/twistedfall/opencv-rust#troubleshooting

twistedfall avatar Oct 01 '22 07:10 twistedfall